From: Robin Roevens <robin.roevens@disroot.org>
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 [thread overview]
Message-ID: <1ebb78d666cedb709676c724fa3c52afd5ecd42c.camel@disroot.org> (raw)
In-Reply-To: <5CC0D100-3C6A-45B5-BA1C-17117D1C1D63@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 6339 bytes --]
Hi
Michael Tremer schreef op vr 14-05-2021 om 13:23 [+0100]:
> Hello,
>
> > On 23 Apr 2021, at 17:15, Robin Roevens <robin.roevens(a)disroot.org>
> > wrote:
> >
> > * Introduce SUMMARY and INITSCRIPTS macro's in LFS-makefiles.
> > * Add a Summary and InitScripts field to the meta-* addon files
> > containing the value's of those macro's.
> > * Replace the INSTALL_INITSCRIPT makefile macro by a new
> > INSTALL_INITSCRIPTS macro/method that will install all initscripts
> > defined in the new INITSCRIPTS macro.
> > * Adapt libvirt and zabbix_agentd pak as examples of how to use
> > this.
> >
> > Signed-off-by: Robin Roevens <robin.roevens(a)disroot.org>
> > ---
> > lfs/Config | 8 ++++++--
> > lfs/libvirt | 6 ++++--
> > lfs/zabbix_agentd | 5 ++++-
> > src/pakfire/meta | 2 ++
> > 4 files changed, 16 insertions(+), 5 deletions(-)
> >
> > diff --git a/lfs/Config b/lfs/Config
> > index eadbbc408..61d6f0c82 100644
> > --- a/lfs/Config
> > +++ b/lfs/Config
> > @@ -299,15 +299,19 @@ define PAK
> > # Create meta file
> > sed \
> > -e "s/NAME/$(PROG)/g" \
> > + -e "s/SUMMARY/$(SUMMARY)/g" \
> > -e "s/VER/$(VER)/g" \
> > -e "s/RELEASE/$(PAK_VER)/g" \
> > -e "s/DEPS/$(DEPS)/g" \
> > -e "s/SIZE/$$(stat --format=%s
> > /install/packages/$(PROG)-$(VER)-$(PAK_VER).ipfire)/g" \
> > + -e "s/INITSCRIPTS/$(INITSCRIPTS)/g" \
> > < /usr/src/src/pakfire/meta > /install/packages/meta-
> > $(PROG)
> > endef
> >
> > -define INSTALL_INITSCRIPT
> > - install -m 754 -v $(DIR_SRC)/src/initscripts/packages/$(1)
> > /etc/rc.d/init.d/$(1)
> > +define INSTALL_INITSCRIPTS
> > + for initscript in $(INITSCRIPTS); do \
> > + install -m 754 -v
> > $(DIR_SRC)/src/initscripts/packages/$$initscript
> > /etc/rc.d/init.d/$$initscript; \
> > + done
> > endef
>
> This won’t abort any more if there install command failed. The exit
> code is ignored and the loop will continue with its next iteration.
>
> You could add “|| exit 1” after the install command. There should be
> plenty of examples in the code where this has been used.
>
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
> >
> > VER = 6.5.0
> > +SUMMARY = Server side daemon and supporting files for
> > libvirt
> >
> > THISAPP = libvirt-$(VER)
> > DL_FILE = $(THISAPP).tar.xz
> > @@ -37,6 +38,8 @@ PAK_VER = 25
> >
> > DEPS = ebtables libpciaccess libtirpc libyajl ncat qemu
> >
> > +INITSCRIPTS= libvirtd virtlogd
> > +
> > ###################################################################
> > ############
> > # Top-level Rules
> > ###################################################################
> > ############
> > @@ -121,8 +124,7 @@ $(TARGET) : $(patsubst
> > %,$(DIR_DL)/%,$(objects))
> > cd $(DIR_APP)/build_libvirt && make install
> >
> > #install initscripts
> > - $(call INSTALL_INITSCRIPT,libvirtd)
> > - $(call INSTALL_INITSCRIPT,virtlogd)
> > + @$(INSTALL_INITSCRIPTS)
> > mv /usr/libexec/libvirt-guests.sh /etc/rc.d/init.d/libvirt-
> > guests
> >
> > # 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
> >
> > VER = 4.2.6
> > +SUMMARY = Zabbix Agent
> >
> > THISAPP = zabbix-$(VER)
> > DL_FILE = $(THISAPP).tar.gz
> > @@ -35,6 +36,8 @@ PROG = zabbix_agentd
> > PAK_VER = 4
> > DEPS =
> >
> > +INITSCRIPTS= zabbix_agentd
> > +
> > ###################################################################
> > ############
> > # Top-level Rules
> > ###################################################################
> > ############
> > @@ -106,7 +109,7 @@ $(TARGET) : $(patsubst
> > %,$(DIR_DL)/%,$(objects))
> > chown zabbix.zabbix /var/run/zabbix
> >
> > # Install initscripts
> > - $(call INSTALL_INITSCRIPT,zabbix_agentd)
> > + @$(INSTALL_INITSCRIPTS)
> >
> > # Install sudoers include file
> > install -v -m 644 $(DIR_SRC)/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
> > --
> > 2.31.1
>
> Also, what happens with all the other files that used to call
> “INSTALL_INITSCRIPT”?
>
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). SO 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
>
> > --
> > Dit bericht is gescanned op virussen en andere gevaarlijke
> > inhoud door MailScanner en lijkt schoon te zijn.
> >
>
>
--
Dit bericht is gescanned op virussen en andere gevaarlijke
inhoud door MailScanner en lijkt schoon te zijn.
next prev parent reply other threads:[~2021-05-14 20:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 16:15 [PATCH 0/3] Pakfile metadata enhancements Robin Roevens
2021-04-23 16:15 ` [PATCH 1/3] buildprocess: Add extra metadata to meta-* files Robin Roevens
2021-05-12 18:49 ` Jonatan Schlag
2021-05-14 12:24 ` Michael Tremer
2021-05-14 20:07 ` Robin Roevens
2021-05-18 15:09 ` Michael Tremer
2021-05-24 20:23 ` Robin Roevens
2021-06-06 18:41 ` Robin Roevens
2021-06-10 11:27 ` Michael Tremer
2021-06-17 22:28 ` Robin Roevens
2021-06-18 8:32 ` Michael Tremer
2021-06-10 11:24 ` Michael Tremer
2021-05-14 12:23 ` Michael Tremer
2021-05-14 20:16 ` Robin Roevens [this message]
2021-05-18 11:12 ` Michael Tremer
2021-04-23 16:15 ` [PATCH 2/3] pakfire: add 'info <pak(s)>' option Robin Roevens
2021-05-13 8:02 ` Jonatan Schlag
2021-05-13 19:11 ` Robin Roevens
2021-05-14 12:19 ` Michael Tremer
2021-05-14 20:24 ` Robin Roevens
2021-05-25 11:22 ` Michael Tremer
2021-04-23 16:15 ` [PATCH 3/3] services.cgi: use new Pakfire::pakinfo function Robin Roevens
2021-05-11 19:30 ` group call for review/opinions/idea's (was: [PATCH 0/3] Pakfile metadata enhancements) Robin Roevens
2021-05-12 18:45 ` [PATCH 0/3] Pakfile metadata enhancements Jonatan Schlag
2021-05-12 22:31 ` Robin Roevens
2021-05-15 12:10 ` Adolf Belka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ebb78d666cedb709676c724fa3c52afd5ecd42c.camel@disroot.org \
--to=robin.roevens@disroot.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox