Re: is there any rpm package for utmps, skalibs?

2024-03-28 Thread ericwq057
Sorry for everyone.

Finally, I switch from QQMail client to MacOS Mai. I notice what’s the damage 
my previous mail made. Sorry again.

Hope this time, I did not make some trouble for the mail list.

Here is the draft spec for skalibs. 
https://github.com/ericwq/rpms/blob/main/skalibs/skalibs.spec.

it will build 4 pacakges.
Wrote: /home/packager/rpmbuild/RPMS/x86_64/skalibs-2.14.1.1-1.fc39.x86_64.rpm
Wrote: 
/home/packager/rpmbuild/RPMS/x86_64/skalibs-doc-2.14.1.1-1.fc39.x86_64.rpm
Wrote: 
/home/packager/rpmbuild/RPMS/x86_64/skalibs-devel-2.14.1.1-1.fc39.x86_64.rpm
Wrote: 
/home/packager/rpmbuild/RPMS/x86_64/skalibs-static-2.14.1.1-1.fc39.x86_64.rpm

please provide your suggestion.

Wang

> On Mar 29, 2024, at 11:15, Ellenor Bjornsdottir 
>  wrote:
> 
> I would add to that that the input method is probably misconfigured. Pressing 
> the spacebar to separate words or components of words should not generate a 
> non-breaking space.
> 
> On Friday, March 29, 2024 2:59:21 AM UTC Alexis wrote:
>> 
>> Your mail client (QQMail 2.x, from the headers) is either 
>> misconfigured or broken. i see the below, because your emails have 
>> only one MIME part, specified by the "Content-Type" header as 
>> "text/plain", even though it's obviously "text/html".
>> 
>> "ericwq057"  writes:
>> 
> 



Re: is there any rpm package for utmps, skalibs?

2024-03-28 Thread Ellenor Bjornsdottir
I would add to that that the input method is probably misconfigured. Pressing 
the spacebar to separate words or components of words should not generate a 
non-breaking space.

On Friday, March 29, 2024 2:59:21 AM UTC Alexis wrote:
> 
> Your mail client (QQMail 2.x, from the headers) is either 
> misconfigured or broken. i see the below, because your emails have 
> only one MIME part, specified by the "Content-Type" header as 
> "text/plain", even though it's obviously "text/html".
> 
> "ericwq057"  writes:
> 
> > switchtoanewplace:https://github.com/ericwq/rpms/blob/main/skalibs/skalibs.spec.itsatemporaryplaceuntilfindagoodplaceforutmpsandskalibs.wang.OriginalFrom:ericwq057lt;ericwq...@qq.comgt;;Date:2024/3/2820:55To:PeterShkenevlt;mustela@erminea.spacegt;;skawaremaillistlt;skaware@list.skarnet.orggt;;Subject:Re:Re:isthereanyrpmpackageforutmps,skalibs?Thanksnbsp;peter.herenbsp;isnbsp;thenbsp;freshnbsp;rpmnbsp;specnbsp;fornbsp;skalibs:nbsp;https://github.com/ericwq/aprilsh/blob/main/build/skalibs/skalibs.specitnbsp;willnbsp;buildnbsp;4nbsp;pacakges.Wrote:nbsp;/home/packager/rpmbuild/RPMS/x86_64/skalibs-2.14.1.1-1.fc39.x86_64.rpmWrote:nbsp;/home/packager/rpmbuild/RPMS/x86_64/skalibs-doc-2.14.1.1-1.fc39.x86_64.rpmWrote:nbsp;/home/packager/rpmbuild/RPMS/x86_64/skalibs-devel-2.14.1.1-1.fc39.x86_64.rpmWrote:nbsp;/home/packager/rpmbuild/RPMS/x86_64/skalibs-static-2.14.1.1-1.fc39.x86_64.rpmpleasenbsp;providenbsp;yournbsp;suggestion.wang.nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;Originalnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;From:Peternbsp;Shkenevlt;nbsp;mustela@erminea.spacenbsp;gt;;Date:2024/3/27nbsp;19:42To:ericwq057lt;nbsp;ericwq...@qq.comnbsp;gt;;Vincentnbsp;denbsp;RIBOUnbsp;vianbsp;skawarelt;nbsp;skaware@list.skarnet.orgnbsp;gt;;Subject:Re:nbsp;isnbsp;therenbsp;anynbsp;rpmnbsp;packagenbsp;fornbsp;utmps,nbsp;skalibs?Hello,Inbsp;havenbsp;RPMnbsp;specnbsp;filenbsp;fornbsp;skalibs.nbsp;Itnbsp;maynbsp;benbsp;outdatednbsp;though,nbsp;andnbsp;itsdefinitelynbsp;notnbsp;thenbsp;examplenbsp;ofnbsp;hownbsp;specsnbsp;shouldnbsp;benbsp;written.https://build.opensuse.org/projects/home:Ermine/packages/skalibs/files/skalibs.spec---Bestnbsp;regards,Peter
> 
> "ericwq057"  writes:
> 
> > Thankspeter.hereisthefreshrpmspecforskalibs:https://github.com/ericwq/aprilsh/blob/main/build/skalibs/skalibs.specitwillbuild4pacakges.Wrote:/home/packager/rpmbuild/RPMS/x86_64/skalibs-2.14.1.1-1.fc39.x86_64.rpmWrote:/home/packager/rpmbuild/RPMS/x86_64/skalibs-doc-2.14.1.1-1.fc39.x86_64.rpmWrote:/home/packager/rpmbuild/RPMS/x86_64/skalibs-devel-2.14.1.1-1.fc39.x86_64.rpmWrote:/home/packager/rpmbuild/RPMS/x86_64/skalibs-static-2.14.1.1-1.fc39.x86_64.rpmpleaseprovideyoursuggestion.wang.OriginalFrom:PeterShkenevlt;mustela@erminea.spacegt;;Date:2024/3/2719:42To:ericwq057lt;ericwq...@qq.comgt;;VincentdeRIBOUviaskawarelt;skaware@list.skarnet.orggt;;Subject:Re:isthereanyrpmpackageforutmps,skalibs?Hello,IhaveRPMspecfileforskalibs.Itmaybeoutdatedthough,anditsdefinitelynottheexampleofhowspecsshouldbewritten.https://build.opensuse.org/projects/home:Ermine/packages/skalibs/files/skalibs.spec---Bestregards,Peter




Re: is there any rpm package for utmps, skalibs?

2024-03-28 Thread Alexis



Your mail client (QQMail 2.x, from the headers) is either 
misconfigured or broken. i see the below, because your emails have 
only one MIME part, specified by the "Content-Type" header as 
"text/plain", even though it's obviously "text/html".


"ericwq057"  writes:


switchtoanewplace:https://github.com/ericwq/rpms/blob/main/skalibs/skalibs.spec.itsatemporaryplaceuntilfindagoodplaceforutmpsandskalibs.wang.OriginalFrom:ericwq057lt;ericwq...@qq.comgt;;Date:2024/3/2820:55To:PeterShkenevlt;mustela@erminea.spacegt;;skawaremaillistlt;skaware@list.skarnet.orggt;;Subject:Re:Re:isthereanyrpmpackageforutmps,skalibs?Thanksnbsp;peter.herenbsp;isnbsp;thenbsp;freshnbsp;rpmnbsp;specnbsp;fornbsp;skalibs:nbsp;https://github.com/ericwq/aprilsh/blob/main/build/skalibs/skalibs.specitnbsp;willnbsp;buildnbsp;4nbsp;pacakges.Wrote:nbsp;/home/packager/rpmbuild/RPMS/x86_64/skalibs-2.14.1.1-1.fc39.x86_64.rpmWrote:nbsp;/home/packager/rpmbuild/RPMS/x86_64/skalibs-doc-2.14.1.1-1.fc39.x86_64.rpmWrote:nbsp;/home/packager/rpmbuild/RPMS/x86_64/skalibs-devel-2.14.1.1-1.fc39.x86_64.rpmWrote:nbsp;/home/packager/rpmbuild/RPMS/x86_64/skalibs-static-2.14.1.1-1.fc39.x86_64.rpmpleasenbsp;providenbsp;yournbsp;suggestion.wang.nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;Originalnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;From:Peternbsp;Shkenevlt;nbsp;mustela@erminea.spacenbsp;gt;;Date:2024/3/27nbsp;19:42To:ericwq057lt;nbsp;ericwq...@qq.comnbsp;gt;;Vincentnbsp;denbsp;RIBOUnbsp;vianbsp;skawarelt;nbsp;skaware@list.skarnet.orgnbsp;gt;;Subject:Re:nbsp;isnbsp;therenbsp;anynbsp;rpmnbsp;packagenbsp;fornbsp;utmps,nbsp;skalibs?Hello,Inbsp;havenbsp;RPMnbsp;specnbsp;filenbsp;fornbsp;skalibs.nbsp;Itnbsp;maynbsp;benbsp;outdatednbsp;though,nbsp;andnbsp;itsdefinitelynbsp;notnbsp;thenbsp;examplenbsp;ofnbsp;hownbsp;specsnbsp;shouldnbsp;benbsp;written.https://build.opensuse.org/projects/home:Ermine/packages/skalibs/files/skalibs.spec---Bestnbsp;regards,Peter


"ericwq057"  writes:


Thankspeter.hereisthefreshrpmspecforskalibs:https://github.com/ericwq/aprilsh/blob/main/build/skalibs/skalibs.specitwillbuild4pacakges.Wrote:/home/packager/rpmbuild/RPMS/x86_64/skalibs-2.14.1.1-1.fc39.x86_64.rpmWrote:/home/packager/rpmbuild/RPMS/x86_64/skalibs-doc-2.14.1.1-1.fc39.x86_64.rpmWrote:/home/packager/rpmbuild/RPMS/x86_64/skalibs-devel-2.14.1.1-1.fc39.x86_64.rpmWrote:/home/packager/rpmbuild/RPMS/x86_64/skalibs-static-2.14.1.1-1.fc39.x86_64.rpmpleaseprovideyoursuggestion.wang.OriginalFrom:PeterShkenevlt;mustela@erminea.spacegt;;Date:2024/3/2719:42To:ericwq057lt;ericwq...@qq.comgt;;VincentdeRIBOUviaskawarelt;skaware@list.skarnet.orggt;;Subject:Re:isthereanyrpmpackageforutmps,skalibs?Hello,IhaveRPMspecfileforskalibs.Itmaybeoutdatedthough,anditsdefinitelynottheexampleofhowspecsshouldbewritten.https://build.opensuse.org/projects/home:Ermine/packages/skalibs/files/skalibs.spec---Bestregards,Peter


Re: is there any rpm package for utmps, skalibs?

2024-03-27 Thread Casper Ti. Vector
On Thu, Mar 28, 2024 at 03:58:24AM +0900, Dominique Martinet wrote:
> Also, if I'm reading this correctly it actually make /usr/bin 777
> because of flawed logic (stat -c %a /bin instead of %{_bin} (= /usr/bin);
> given /bin is normally a symlink to /usr/bin that stat will return 777
> and the later chmod to "restore" the mode will corrupt it)

Thanks; that's an overlooked (but fairly serious) bug, and has just been
fixed in the repository where the code come from.

> But hopefully it's only ever been run in throw-away containers

Which is the explicitly [1][2] only way it is expected to be used.

[1] .
[2] .

-- 
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2024.09.30)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C



Re: is there any rpm package for utmps, skalibs?

2024-03-27 Thread Dominique Martinet
Casper Ti. Vector wrote on Wed, Mar 27, 2024 at 08:37:46PM +0800:
> On Wed, Mar 27, 2024 at 07:43:24PM +0900, Dominique Martinet wrote:
> > You should never need sudo in the install section of a spec file --
> > you install to %{buildroot}, not directly to the system's bin/lib
> > directories!
> 
> It is moving files *into* %{buildroot}, not *out of*. The converse
> is done in the `build' section.

I have no idea what it's doing in the hidden fn-builds script, but from
what's in the spec file it is using sudo to run chmod on system
directories and make them owned by the building user before actually
running make install without DESTDIR, which I'll repeat is installing
stuff in the systems directories and should never be needed;
if something in skaware does not support DESTDIR that should be fixed
but given alpine packages build just fine I don't expect any such
problem, and such trick is just bad practice.

Also, if I'm reading this correctly it actually make /usr/bin 777
because of flawed logic (stat -c %a /bin instead of %{_bin} (= /usr/bin);
given /bin is normally a symlink to /usr/bin that stat will return 777
and the later chmod to "restore" the mode will corrupt it), so anyone
running this will have opened their system for being taken over
(and it possibly also doesn't chown back to root? But hopefully it's
only ever been run in throw-away containers so nobody would notice
anyway..)


Anyway, I don't care if people shoot themselves in the foot, even if
they're just running a script given by a stranger without checking what
it does, I won't reply to this thread any further.
-- 
Dominique Martinet | Asmadeus


Re: is there any rpm package for utmps, skalibs?

2024-03-27 Thread Casper Ti. Vector
On Wed, Mar 27, 2024 at 07:43:24PM +0900, Dominique Martinet wrote:
> You should never need sudo in the install section of a spec file --
> you install to %{buildroot}, not directly to the system's bin/lib
> directories!

It is moving files *into* %{buildroot}, not *out of*. The converse
is done in the `build' section.  EPICS is a packaging-unfriendly
software framework, which resulted in forementioned ugly tricks being
involved.  I just reused the ugly tricks to make a monolithic package
that contains skalibs, execline and s6.

-- 
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2024.09.30)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C



Re: is there any rpm package for utmps, skalibs?

2024-03-27 Thread Peter Shkenev
Hello,

I have RPM spec file for skalibs. It may be outdated though, and it's
definitely not the example of how specs should be written.

https://build.opensuse.org/projects/home:Ermine/packages/skalibs/files/skalibs.spec

---
Best regards,
Peter


Re: is there any rpm package for utmps, skalibs?

2024-03-27 Thread Laurent Bercot
my first question is: does skalibs support glibc? alpine only support 
musl.


 Yes. skalibs supports everything that makes a good attempt to be
POSIX-conformant, so that includes glibc.

--
 Laurent



Re: is there any rpm package for utmps, skalibs?

2024-03-27 Thread Dominique Martinet
Casper Ti. Vector wrote on Wed, Mar 27, 2024 at 05:54:23PM +0800:
> Attached is spec code that builds a monolithic RPM package for skalibs,
> execline and s6, tested under CentOS 7 and Rocky Linux 8; it needs to be
> used with .  It uses ugly
> tricks, most importantly invoking sudo to move files from/to root-owned

You should never need sudo in the install section of a spec file --
you install to %{buildroot}, not directly to the system's bin/lib
directories!

I'm not sure how that actually find files to bundle in the rpm
afterwards...

-- 
Dominique Martinet | Asmadeus


Re: is there any rpm package for utmps, skalibs?

2024-03-27 Thread Casper Ti. Vector
On Wed, Mar 27, 2024 at 01:41:49PM +0800, ericwq057 wrote:
> I search fedora39/centos 7, there is no available rpm package for
> utmps or skalibs. Asked google, there is only a very old (1.6) skalibs
> rpm spec available: https://github.com/imeyer/skalibs-rpm. Is there
> any plan to support rpm package? Recently I prepared to build rpm
> package for my project. Maybe I can help to build rpm package for
> skalibs and utmps. But I definitely need your help for rpm package.

Attached is spec code that builds a monolithic RPM package for skalibs,
execline and s6, tested under CentOS 7 and Rocky Linux 8; it needs to be
used with .  It uses ugly
tricks, most importantly invoking sudo to move files from/to root-owned
directories, and is therefore mostly intended for reference purpose
(apart from where it is actually used -- part of some EPICS-related
work which I plan to publish later this year).

-- 
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2024.09.30)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C

%define skaver 2.13.1.1
%define execver 2.9.3.0

Name:   s6
Version:2.11.3.2
Release:2.el%{rhel}
Summary:skarnet's small and secure supervision software suite

License:ISC
URL:https://skarnet.org/software/s6/
Source0:https://skarnet.org/software/skalibs/skalibs-%{skaver}.tar.gz
Source1:https://skarnet.org/software/execline/execline-%{execver}.tar.gz
Source2:https://skarnet.org/software/s6/s6-%{version}.tar.gz
Patch0: %{name}-files.patch

BuildRequires:  gcc, make

%description

%prep
%setup -T -c -n %{name}
. %{_specdir}/fn-build.sh
tar xpf %{S:0}; _mv_commit skalibs %{skaver}
tar xpf %{S:1}; _mv_commit execline %{execver}
tar xpf %{S:2}; _mv_commit s6 %{version}
patch -p1 < %{P:0}

%build
stat -c '%a' /bin > bin.mod; stat -c '%a' %{_libdir} > libdir.mod
sudo chmod 0755 %{_bindir} %{_libdir}
%_chown_me %{_bindir} %{_libexecdir} %{_libdir} %{_includedir}
confargs='--bindir=%{_bindir} --libexecdir=%{_libexecdir} --disable-shared'
confargs="$confargs --with-sysdep-devurandom=yes --with-sysdep-posixspawn=no"
for pkg in skalibs execline s6; do cd "$pkg"
sed -i 's@/usr/lib\>@%{_libdir}@' configure
./configure $confargs; make %{?_smp_mflags}
mkdir image; make install; make DESTDIR="$PWD"/image install
cd -; done

%install
. %{_specdir}/fn-build.sh; mkdir rm
_mv_me "$PWD"/rm %{_bindir} %{_libexecdir} %{_libdir} %{_includedir}
sudo chmod "$(cat bin.mod)" %{_bindir}
sudo chmod "$(cat libdir.mod)" %{_libdir}
for pkg in skalibs execline s6; do
cp -a "$pkg"/image/* %{buildroot}
done
cd %{buildroot}%{_bindir}; rm cd umask; mv wait execline-wait; cd -
mkdir -p %{buildroot}%{_prefix}/lib/systemd/system \
%{buildroot}/var/service/.s6-svscan
install -m 0644 *.service %{buildroot}%{_prefix}/lib/systemd/system
install -m 0755 crash SIGTERM %{buildroot}/var/service/.s6-svscan
%_file_list %{_bindir} %{_libexecdir} > files.lst

%files -f %{_builddir}/%{name}/files.lst
%{_includedir}/skalibs
%{_includedir}/execline
%{_includedir}/s6
%{_libdir}/skalibs
%{_libdir}/execline
%{_libdir}/s6
%{_prefix}/lib/systemd/system/*.service
/var/service/.s6-svscan/*

diff -Nur 0/crash 1/crash
--- 0/crash	1970-01-01 08:00:00.0 +0800
+++ 1/crash	2023-12-20 23:21:29.956693399 +0800
@@ -0,0 +1,2 @@
+#!/bin/sh -
+
diff -Nur 0/s6.service 1/s6.service
--- 0/s6.service	1970-01-01 08:00:00.0 +0800
+++ 1/s6.service	2023-12-20 23:22:47.352897253 +0800
@@ -0,0 +1,14 @@
+[Unit]
+Description=s6
+Wants=rc-local.service
+After=rc-local.service
+
+[Service]
+ExecStart=/bin/execline-cd /var/service emptyenv -p s6-svscan
+ExecReload=/usr/bin/s6-svscanctl -h /var/service
+KillMode=mixed
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+
diff -Nur 0/SIGTERM 1/SIGTERM
--- 0/SIGTERM	1970-01-01 08:00:00.0 +0800
+++ 1/SIGTERM	2023-12-20 23:21:29.956693399 +0800
@@ -0,0 +1,3 @@
+#!/bin/sh -
+exec s6-svscanctl -t .
+


Re: is there any rpm package for utmps, skalibs?

2024-03-27 Thread Laurent Bercot



 Hi Wang,

 Your e-mail client seems to be broken. It sends HTML entities as 
text/plain,
and it makes the content of your mail unreadable. Please fix this, if 
you can.


 From what I can understand, you're looking for rpm packages for skalibs
and utmps. I don't know if there are any; I haven't had any contact from 
a

Fedora maintainer or user.

 If anyone's interested in making rpm packages for skaware, or in 
helping

Wang make them, please show yourself :)

--
 Laurent