From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Roevens To: development@lists.ipfire.org Subject: Re: [PATCH 1/3] buildprocess: Add extra metadata to meta-* files Date: Fri, 14 May 2021 22:16:54 +0200 Message-ID: <1ebb78d666cedb709676c724fa3c52afd5ecd42c.camel@disroot.org> In-Reply-To: <5CC0D100-3C6A-45B5-BA1C-17117D1C1D63@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7430452466965917714==" List-Id: --===============7430452466965917714== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Michael Tremer schreef op vr 14-05-2021 om 13:23 [+0100]: > Hello, >=20 > > On 23 Apr 2021, at 17:15, Robin Roevens > > wrote: > >=20 > > * Introduce SUMMARY and INITSCRIPTS macro's in LFS-makefiles. > > * Add a Summary and InitScripts field to the meta-* addon files > > =C2=A0containing the value's of those macro's. > > * Replace the INSTALL_INITSCRIPT makefile macro by a new > > =C2=A0INSTALL_INITSCRIPTS macro/method that will install all initscripts > > =C2=A0defined in the new INITSCRIPTS macro. > > * Adapt libvirt and zabbix_agentd pak as examples of how to use > > this. > >=20 > > Signed-off-by: Robin Roevens > > --- > > lfs/Config=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 8 ++++++-- > > lfs/libvirt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 6 ++++-- > > lfs/zabbix_agentd | 5 ++++- > > src/pakfire/meta=C2=A0 | 2 ++ > > 4 files changed, 16 insertions(+), 5 deletions(-) > >=20 > > diff --git a/lfs/Config b/lfs/Config > > index eadbbc408..61d6f0c82 100644 > > --- a/lfs/Config > > +++ b/lfs/Config > > @@ -299,15 +299,19 @@ define PAK > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# Create meta file > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0sed \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0-e "s/NAME/$(PROG)/g" \ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0-e "s/SUMMARY/$(SUMMARY)/g" \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0-e "s/VER/$(VER)/g" \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0-e "s/RELEASE/$(PAK_VER)/g" \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0-e "s/DEPS/$(DEPS)/g" \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0-e "s/SIZE/$$(stat --format=3D%s > > /install/packages/$(PROG)-$(VER)-$(PAK_VER).ipfire)/g" \ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0-e "s/INITSCRIPTS/$(INITSCRIPTS)/g" \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 < /usr/src/src/pak= fire/meta > /install/packages/meta- > > $(PROG) > > endef > >=20 > > -define INSTALL_INITSCRIPT > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0install -m 754 -v $(DIR_SRC)/s= rc/initscripts/packages/$(1)=C2=A0 > > /etc/rc.d/init.d/$(1) > > +define INSTALL_INITSCRIPTS > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0for initscript in $(INITSCRIPT= S); do \ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0install -m 754 -v > > $(DIR_SRC)/src/initscripts/packages/$$initscript=C2=A0 > > /etc/rc.d/init.d/$$initscript; \ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0done > > endef >=20 > This won=E2=80=99t abort any more if there install command failed. The exit > code is ignored and the loop will continue with its next iteration. >=20 > You could add =E2=80=9C|| exit 1=E2=80=9D after the install command. There = should be > plenty of examples in the code where this has been used. >=20 Good point. will add that. > > ifeq "$(BUILD_ARCH)" "$(filter $(BUILD_ARCH),aarch64 riscv64)" > > diff --git a/lfs/libvirt b/lfs/libvirt > > index 28a95d317..be5d3db3a 100644 > > --- a/lfs/libvirt > > +++ b/lfs/libvirt > > @@ -25,6 +25,7 @@ > > include Config > >=20 > > VER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 6.5.0 > > +SUMMARY=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D = Server side daemon and supporting files for > > libvirt > >=20 > > THISAPP=C2=A0=C2=A0=C2=A0 =3D libvirt-$(VER) > > DL_FILE=C2=A0=C2=A0=C2=A0 =3D $(THISAPP).tar.xz > > @@ -37,6 +38,8 @@ PAK_VER=C2=A0=C2=A0=C2=A0 =3D 25 > >=20 > > DEPS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ebtables libpciaccess libtir= pc libyajl ncat qemu > >=20 > > +INITSCRIPTS=3D libvirtd virtlogd > > + > > ################################################################### > > ############ > > # Top-level Rules > > ################################################################### > > ############ > > @@ -121,8 +124,7 @@ $(TARGET) : $(patsubst > > %,$(DIR_DL)/%,$(objects)) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0cd $(DIR_APP)/build_libvi= rt && make install > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0#install initscripts > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0$(call INSTALL_INITSCRIPT,libv= irtd) > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0$(call INSTALL_INITSCRIPT,virt= logd) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0@$(INSTALL_INITSCRIPTS) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0mv /usr/libexec/libvirt-g= uests.sh /etc/rc.d/init.d/libvirt- > > guests > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# Backup > > diff --git a/lfs/zabbix_agentd b/lfs/zabbix_agentd > > index c69643a54..a72fe024b 100644 > > --- a/lfs/zabbix_agentd > > +++ b/lfs/zabbix_agentd > > @@ -25,6 +25,7 @@ > > include Config > >=20 > > VER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 4.2.6 > > +SUMMARY=C2=A0=C2=A0=C2=A0 =3D Zabbix Agent > >=20 > > THISAPP=C2=A0=C2=A0=C2=A0 =3D zabbix-$(VER) > > DL_FILE=C2=A0=C2=A0=C2=A0 =3D $(THISAPP).tar.gz > > @@ -35,6 +36,8 @@ PROG=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D zabbix_age= ntd > > PAK_VER=C2=A0=C2=A0=C2=A0 =3D 4 > > DEPS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D > >=20 > > +INITSCRIPTS=3D zabbix_agentd > > + > > ################################################################### > > ############ > > # Top-level Rules > > ################################################################### > > ############ > > @@ -106,7 +109,7 @@ $(TARGET) : $(patsubst > > %,$(DIR_DL)/%,$(objects)) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0chown zabbix.zabbix /var/= run/zabbix > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# Install initscripts > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0$(call INSTALL_INITSCRIPT,zabb= ix_agentd) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0@$(INSTALL_INITSCRIPTS) > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# Install sudoers include= file > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0install -v -m 644 $(DIR_S= RC)/config/zabbix_agentd/sudoers \ > > diff --git a/src/pakfire/meta b/src/pakfire/meta > > index d97b2a0fa..849b9cd6c 100644 > > --- a/src/pakfire/meta > > +++ b/src/pakfire/meta > > @@ -1,6 +1,8 @@ > > Name: NAME > > +Summary: SUMMARY > > ProgVersion: VER > > Release: RELEASE > > Size: SIZE > > Dependencies: DEPS > > File: NAME-VER-RELEASE.ipfire > > +InitScripts: INITSCRIPTS > > --=20 > > 2.31.1 >=20 > Also, what happens with all the other files that used to call > =E2=80=9CINSTALL_INITSCRIPT=E2=80=9D? >=20 What other files call INSTALL_INITSCRIPT ? Is it not only called from the lfs files? The intention is of course, in the final patch-set to adapt all lfs files to use the INITSCRIPTS variable and call INSTALL_INITSCIPTS instead of individual calls to INSTALL_INITSCRIPT. But I did not yet want to do this, since my idea could also be shot down or drastically adapted, making that work obsolete. (already proven by my new SERVICES/INITSCRIPTS proposal in my previous mail).=C2=A0SO I currently only included 2 examples (zabbix_agentd and libvirt) of the changes to the lfs files involved. If that is what you meant ? Regards Robin > -Michael >=20 > > --=20 > > Dit bericht is gescanned op virussen en andere gevaarlijke > > inhoud door MailScanner en lijkt schoon te zijn. > >=20 >=20 >=20 --=20 Dit bericht is gescanned op virussen en andere gevaarlijke inhoud door MailScanner en lijkt schoon te zijn. --===============7430452466965917714==--