unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PACKAGE] sinit
@ 2016-07-30 12:33 Vincent Legoll
  2016-07-30 13:46 ` Vincent Legoll
  2016-07-30 22:49 ` ng0
  0 siblings, 2 replies; 9+ messages in thread
From: Vincent Legoll @ 2016-07-30 12:33 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]

Hello,

here is the packaging of sinit, a minimalistic /sbin/init replacement.

It shows the use of the musl libc previously posted.

Please advise on how to further proceed with the submission,
where should I put this package, etc...

Thanks

-- 
Vincent Legoll

[-- Attachment #2: sinit.scm --]
[-- Type: text/x-scheme, Size: 2218 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright <C2><A9> 2016 Vincent Legoll <vincent.legoll@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (sinit)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix licenses)
  #:use-module (gnu packages)
  #:use-module (musl)
)

(define-public sinit
  (package
    (name "sinit")
    (version "1.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://git.suckless.org/sinit/snapshot/" name
                                  "-" version ".tar.bz2"))
              (sha256
               (base32
                "1chdfcca7js0vgnw3l68sy8js8b01l4bpjbbfw4mfln5742ys5s9"))
              (patches (search-patches "sinit-build-fix.patch"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (delete 'configure))
       #:tests? #f                                ; no 'check' target
       #:make-flags (list "CC=musl-gcc"
                          (string-append "PREFIX=" (assoc-ref %outputs "out")))))
    (inputs `(("musl" ,musl)))
    (synopsis "This package is a suckless init")
    (description "Initially based on Rich Felker’s minimal init.  The sinit
package is considered complete and no further development is expected to
happen.  The sinit binary file is statically linked against the minimalistic
musl libc.")
    (home-page "http://core.suckless.org/sinit")
    (license (x11-style "file://LICENSE"))))


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PACKAGE] sinit
  2016-07-30 12:33 [PACKAGE] sinit Vincent Legoll
@ 2016-07-30 13:46 ` Vincent Legoll
  2016-07-30 16:19   ` Vincent Legoll
  2016-07-30 22:49 ` ng0
  1 sibling, 1 reply; 9+ messages in thread
From: Vincent Legoll @ 2016-07-30 13:46 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

Here is the accompanying patch for sinit to build properly under guix

It will be submitted alongside the scm modifs.

I may even try to make it upstream, as it's fairly straightforward...

-- 
Vincent Legoll

[-- Attachment #2: sinit-build-fix.patch --]
[-- Type: text/x-patch, Size: 375 bytes --]

diff -Nur sinit-1.0-orig/config.mk sinit-1.0/config.mk
--- sinit-1.0-orig/config.mk	2015-06-16 11:37:07.000000000 +0200
+++ sinit-1.0/config.mk	2016-07-13 10:24:25.952000000 +0200
@@ -2,10 +2,10 @@
 VERSION = 1.0
 
 # paths
-PREFIX = /usr/local
+PREFIX ?= /usr/local
 MANPREFIX = $(PREFIX)/share/man
 
-CC = cc
+CC ?= cc
 LD = $(CC)
 CPPFLAGS =
 CFLAGS   = -Wextra -Wall -Os

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PACKAGE] sinit
  2016-07-30 13:46 ` Vincent Legoll
@ 2016-07-30 16:19   ` Vincent Legoll
  2016-08-07  0:48     ` Leo Famulari
  0 siblings, 1 reply; 9+ messages in thread
From: Vincent Legoll @ 2016-07-30 16:19 UTC (permalink / raw)
  To: guix-devel

On Sat, Jul 30, 2016 at 3:46 PM, Vincent Legoll
<vincent.legoll@gmail.com> wrote:
> Here is the accompanying patch for sinit to build properly under guix
>
> It will be submitted alongside the scm modifs.
>
> I may even try to make it upstream, as it's fairly straightforward...

DONE:
http://lists.suckless.org/hackers/1607/11719.html

Dunno the responsiveness, so no ETA for an upstream release fixing this...

-- 
Vincent Legoll

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PACKAGE] sinit
  2016-07-30 12:33 [PACKAGE] sinit Vincent Legoll
  2016-07-30 13:46 ` Vincent Legoll
@ 2016-07-30 22:49 ` ng0
  2016-08-02  7:00   ` Vincent Legoll
  1 sibling, 1 reply; 9+ messages in thread
From: ng0 @ 2016-07-30 22:49 UTC (permalink / raw)
  To: Vincent Legoll, guix-devel

Vincent Legoll <vincent.legoll@gmail.com> writes:

> Hello,
>
> here is the packaging of sinit, a minimalistic /sbin/init replacement.
>
> It shows the use of the musl libc previously posted.
>
> Please advise on how to further proceed with the submission,
> where should I put this package, etc...
>
> Thanks

I'd like to test musl, but I would not know how to test sinit…
While I had this (musl) on my todo list as well, is sinit only limited
to musl? I guess it's not, but I don't know the software.


It would be best if the choice of libc was more dynamic.. uclibc-ng is
on my todo list for that. But I don't know how to approach this,
same goes for libressl v openssl situation.
Create lots of inheriting packages? Some packages require patches for
musl and libressl (outside of guix).

This is a bit affected by my experience in Gentoo where I dropped musl
only because I needed a "vanilla" environment for packaging (and feel
like not fixing musl problems in addition to maintaining packages).
-- 
♥Ⓐ  ng0
Current Keys: https://we.make.ritual.n0.is/ng0.txt
For non-prism friendly talk find me on http://www.psyced.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PACKAGE] sinit
  2016-07-30 22:49 ` ng0
@ 2016-08-02  7:00   ` Vincent Legoll
  0 siblings, 0 replies; 9+ messages in thread
From: Vincent Legoll @ 2016-08-02  7:00 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

> I'd like to test musl, but I would not know how to test sinit…

I also don't know myself :-)

I know that just building it does not make it pid 1, that will be the next
thing to search...

Ideally, I'd like to make it pid 1, and getting it to just run shepherd on
top, that would be a good first step.

> While I had this (musl) on my todo list as well, is sinit only limited
> to musl? I guess it's not, but I don't know the software.

I don't think it is, I'll try to build it with glibc.

> It would be best if the choice of libc was more dynamic...

It would be cool to be able to do a full musl (or other libc) -based system,
but that is not my current goal. Just being able to build a few select
packages with another libc is already interesting.

> Create lots of inheriting packages? Some packages require patches for
> musl and libressl (outside of guix).

That's orthogonal to the packaging of the libcs though, once they are there
maybe people will start experimenting with them.

> This is a bit affected by my experience in Gentoo where I dropped musl
> only because I needed a "vanilla" environment for packaging (and feel
> like not fixing musl problems in addition to maintaining packages).

I can certainly understand that

-- 
Vincent Legoll

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PACKAGE] sinit
  2016-07-30 16:19   ` Vincent Legoll
@ 2016-08-07  0:48     ` Leo Famulari
  2016-08-07 11:55       ` ng0
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2016-08-07  0:48 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel

On Sat, Jul 30, 2016 at 06:19:47PM +0200, Vincent Legoll wrote:
> On Sat, Jul 30, 2016 at 3:46 PM, Vincent Legoll
> <vincent.legoll@gmail.com> wrote:
> > Here is the accompanying patch for sinit to build properly under guix
> >
> > It will be submitted alongside the scm modifs.
> >
> > I may even try to make it upstream, as it's fairly straightforward...
> 
> DONE:
> http://lists.suckless.org/hackers/1607/11719.html
> 
> Dunno the responsiveness, so no ETA for an upstream release fixing this...

I noticed they replied with another suggestion:

http://lists.suckless.org/hackers/1607/11720.html

What happens if you set those variables in #:make-flags? There is an
example in (gnu packages dvtm).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PACKAGE] sinit
  2016-08-07  0:48     ` Leo Famulari
@ 2016-08-07 11:55       ` ng0
  2016-08-08 12:48         ` Vincent Legoll
  0 siblings, 1 reply; 9+ messages in thread
From: ng0 @ 2016-08-07 11:55 UTC (permalink / raw)
  To: Leo Famulari, Vincent Legoll; +Cc: guix-devel

Leo Famulari <leo@famulari.name> writes:

> On Sat, Jul 30, 2016 at 06:19:47PM +0200, Vincent Legoll wrote:
>> On Sat, Jul 30, 2016 at 3:46 PM, Vincent Legoll
>> <vincent.legoll@gmail.com> wrote:
>> > Here is the accompanying patch for sinit to build properly under guix
>> >
>> > It will be submitted alongside the scm modifs.
>> >
>> > I may even try to make it upstream, as it's fairly straightforward...
>> 
>> DONE:
>> http://lists.suckless.org/hackers/1607/11719.html
>> 
>> Dunno the responsiveness, so no ETA for an upstream release fixing this...
>
> I noticed they replied with another suggestion:
>
> http://lists.suckless.org/hackers/1607/11720.html
>
> What happens if you set those variables in #:make-flags? There is an
> example in (gnu packages dvtm).
>

This should just work, Vincent. See the 'ii' package I sent today.

-- 
♥Ⓐ  ng0
Current Keys: https://we.make.ritual.n0.is/ng0.txt
For non-prism friendly talk find me on http://www.psyced.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PACKAGE] sinit
  2016-08-07 11:55       ` ng0
@ 2016-08-08 12:48         ` Vincent Legoll
  2016-08-09 18:42           ` Ricardo Wurmus
  0 siblings, 1 reply; 9+ messages in thread
From: Vincent Legoll @ 2016-08-08 12:48 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

> This should just work, Vincent. See the 'ii' package I sent today.

D'oh !

It (#:make-flags?) was already there in the scm I submitted, but that
wasn't working when I tested it first time, maybe because I did not
know about guix environment at that time and tried the build it outside
of one...

I'll clean that up and resubmit properly...

-- 
Vincent Legoll

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PACKAGE] sinit
  2016-08-08 12:48         ` Vincent Legoll
@ 2016-08-09 18:42           ` Ricardo Wurmus
  0 siblings, 0 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2016-08-09 18:42 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel


Vincent Legoll <vincent.legoll@gmail.com> writes:

> It (#:make-flags?) was already there in the scm I submitted, but that
> wasn't working when I tested it first time, maybe because I did not
> know about guix environment at that time and tried the build it outside
> of one...
>
> I'll clean that up and resubmit properly...

Thanks.  When you resubmit this could you please give it a try to send
it as a patch?  If you’re using a git clone of the Guix repository you
can make a local commit (in a separate branch) and then run

    git format-patch -1

to create a patch from the last commit.  You could then attach the patch
file to an email (or use “git send-email …” if you already have email
sending configured on your machine).

This would make things a little easier for us and make it more likely
that your contribution is reviewed and merged sooner.

Thanks again!

~~ Ricardo

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-08-09 18:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-30 12:33 [PACKAGE] sinit Vincent Legoll
2016-07-30 13:46 ` Vincent Legoll
2016-07-30 16:19   ` Vincent Legoll
2016-08-07  0:48     ` Leo Famulari
2016-08-07 11:55       ` ng0
2016-08-08 12:48         ` Vincent Legoll
2016-08-09 18:42           ` Ricardo Wurmus
2016-07-30 22:49 ` ng0
2016-08-02  7:00   ` Vincent Legoll

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).