Some suggestions and questions about rpm packaging
Sorry, I was unclear when I posted link to Rosa's rootfs, I used specifically this archive, and untarred it in pre-created subdirectory: rootfs-std-rosa2016.1_x86_64_2020-04-02.tar.xz http://file-store.rosalinux.ru/api/v1/file_stores/3f1cb1e4069d183ade5379c0d4... I actually copied it to btrfs-formatted file in tmpfs, mounted with compression option (-ocompress) From there I mount -obind /dev, /sys, /proc/ /dev/pts from host system into chroot and chroot'ed there. "urpmi package" will install package. You can add many of them as args. rpmbuild may complain initially about not created directory, so create it manually. At the end of binary package creation I saw: cinelerra.x86_64: W: no-documentation cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/de/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/el/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/es/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/eu/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/fr/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/hi/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/it/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/ja/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/ko/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/nb/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/pt/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/ru/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/sl/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/uk/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/vi/LC_MESSAGES/cin.mo cinelerra.x86_64: W: file-not-in-%lang /usr/share/locale/zh/LC_MESSAGES/cin.mo cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_hulk.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_bright.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_blond_cv.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_cakewalk.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_suv.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_blue.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_neophyte.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_blue_dot.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_pinklady.plugin cinelerra.x86_64: W: executable-stack /usr/bin/cin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_unflat.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/themes/theme_blond.plugin cinelerra.x86_64: W: executable-stack /usr/lib64/cin/plugins/video/chromakeyhsv.plugin 2 packages and 0 specfiles checked; 0 errors, 30 warnings. Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.90675 + umask 022 + cd /root/rpmbuild/BUILD + cd cinelerra-5.1 + /bin/rm -rf /root/rpmbuild/BUILDROOT/cinelerra-5.1-20200331-rosa2016.1.x86_64-buildroot It seems at least file-not-in-%lang can be easily cured: https://en.opensuse.org/openSUSE:Packaging_checks file-not-in-%lang W: file-not-in-%lang /usr/share/sarg/sarg-php/locale/en_EN/LC_MESSAGES/messages.mo A gettext translation file (those ending in .mo) is not properly tagged by language. This information might be useful in the future to be able to leave out certain languages during installation. The %find_lang macro can be used to automatically tag files. https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25find_la... %find_lang This macro helps to mark locale-dependent files with the respective %lang tag in the file list. Synopsis %find_lang name [filelist] The %find_lang macro searches the directories /usr/share/locale and locale/*/LC_MESSAGES for name.mo files. It also searches gnome/help/name and kde*/share/doc/HTML/*/name directories for a localized documentation. Then it creates the file filelist where the files are marked with the respective %lang(locale) and %doc tags. Such a file list can be then passed to the %files tag via the -f option. See below for an example. It is recommended to use this macro only if the BuildRoot tag is defined as otherwise the entire system will be searched. %find_lang should be used in %install section. Example usage %install # installation %find_lang %{name} %files -f %{name}.lang --- But I haven't tried this trick for .spec file yet .... For executable-stack there is solution given at first link, too: Solutions: A comprehensive article about this problem can be found at http://www.gentoo.org/proj/en/hardened/gnu-stack.xml Probably the easiest solution is to pass -Wl,-z,noexecstack to the linker. Hm, in our case this line probably can be added in plugin_config (in Cinelerra-5.1 src root)? Or better to add this to main configure.ac ? I see line if test "x$CYGWIN" != "x" ; then echo 'FF_PATH ?= /usr/local' echo 'LDFLAGS += -L$(FF_PATH)/lib' echo 'CFLAGS += -I$(FF_PATH)/include' echo "" echo "CFLAGS += -DNO_BTRACE" echo "CFLAGS += -DNO_GDB" echo "CFLAGS += -DNO_CTX" echo "CFLAGS += -DNO_PRCTL" echo "CFLAGS += -DNO_TID" echo "CFLAGS += -DNO_XSELECT" echo "" else LDFLAGS+=" -z noexecstack" but it is "z noexecstack", not "-z,noexecstack" (space, not comma) At least gentoo page referenced also says "# This line goes before LDFLAGS is used (either by the ebuild or by econf/emake) append-ldflags -Wl,-z,noexecstack" so, probably add "," after z in this statement. But I'm not sure why only some binaries show this warning .... as --version GNU assembler (GNU Binutils) 2.26.1 (in Rosa 2016.1 chroot) I have 2.29.1 binutils on my host machine. Also, what exactly can be marked as documentation, in our case? {with %doc line in spec} Only README ? and probably %license COPYING ??
participants (1)
-
Andrew Randrianasulu