Architecture question (noarch or i586/x86_64?)

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Architecture question (noarch or i586/x86_64?)

Karl Ove Hufthammer
Dear list members,

I’m creating my first package, but I’m not sure if it should be
considered noarch or i586/x86_64, and the documentation varies on the
exact definition of noarch.

Basically, my package *is* architecture-neutral, as the exact same
package should work on all architectures, without any need for
recompiling. Some features of this package:

– Contains no binary (compiled) executable files.
– Does contain a no-binary executable file – a shell script, which
  *uses* other binaries, like grep and awk and coreutils stuff.
– Contains *data* files that are ‘built’.

So, should it be considered noarch (rpmlint thinks so) or i586/x86_64?

This is the package (and I’d appreciate any comments, as this is my
first package):
https://build.opensuse.org/package/show?package=ordbanken&project=home%3Ahuftis%3Aordbanken

--
Karl Ove Hufthammer
http://huftis.org/
Jabber: [hidden email]

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Architecture question (noarch or i586/x86_64?)

Křištof Želechovski-2
Dnia niedziela, 2 września 2012 08:53:24 Karl Ove Hufthammer pisze:

> So, should it be considered noarch (rpmlint thinks so) or i586/x86_64?
>
> This is the package (and I’d appreciate any comments, as this is my
> first package):
> https://build.opensuse.org/package/show?package=ordbanken&project=home%3Ahuf
> tis%3Aordbanken

It should be noarch.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Architecture question (noarch or i586/x86_64?)

Karl Ove Hufthammer
su. den 02. 09. 2012 klokka 13.26 (+0200) skreiv Křištof Želechovski:
> > So, should it be considered noarch (rpmlint thinks so) or
> i586/x86_64?
> >
> > This is the package (and I’d appreciate any comments, as this is my
> > first package):
> > https://build.opensuse.org/package/show?package=ordbanken&project=home%3Ahuftis%3Aordbanken
>
> It should be noarch.
>
Thanks. I’ve now changed it to noarch, by changing BuildArch in the
specfile and changing the meta configuration for the project. However,
now *no* package seems to be built on OBS. Any ideas why, and how to fix
this?

I also have another packaging question for the application. The main
application is an architecture-independent command-line shell script,
but it also has an optinal KDE-based GUI (actually, a plasmoid), not
currently packaged.

The original package works fine as a command-line application, and I
don’t want any unneeded dependencies on KDE. So I guess for the GUI
part I should create a *new* package, with a new .spec file, with a
‘Requires’ line depending on the needed KDE packages and the
command-line package (it uses the shell script and the data files). Is
that correct, or can everything be written in *one* .spec file? And if I
create a new package, is it possible for this to somehow use the
original source tarball, so I don’t have to upload it twice every time a
new version is released?

BTW, the KDE-based GUI is actually written in Python, and contains
binary executables, so I guess this should be ‘noarch’ too?

--
Karl Ove Hufthammer

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Architecture question (noarch or i586/x86_64?)

Karl Ove Hufthammer
Karl Ove Hufthammer skreiv:

> BTW, the KDE-based GUI is actually written in Python, and contains
> binary executables, so I guess this should be ‘noarch’ too?

That should of course have been ‘contains *no* binary executables’.

--
Karl Ove Hufthammer


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Architecture question (noarch or i586/x86_64?)

Marguerite Su
In reply to this post by Karl Ove Hufthammer
On Sun, Sep 2, 2012 at 8:02 PM, Karl Ove Hufthammer <[hidden email]> wrote:
> Thanks. I’ve now changed it to noarch, by changing BuildArch in the
> specfile and changing the meta configuration for the project. However,
> now *no* package seems to be built on OBS. Any ideas why, and how to fix
> this?
>

do no change meta. we have no "noarch" build host to build noarch packages.

if the build shows success, it must output packages. by the way, the
package is not under x86_64 or i586 directory but noarch directory.

> The original package works fine as a command-line application, and I
> don’t want any unneeded dependencies on KDE. So I guess for the GUI
> part I should create a *new* package, with a new .spec file, with a
> ‘Requires’ line depending on the needed KDE packages and the
> command-line package (it uses the shell script and the data files). Is
> that correct, or can everything be written in *one* .spec file? And if I
> create a new package, is it possible for this to somehow use the
> original source tarball, so I don’t have to upload it twice every time a
> new version is released?
>

yes you can.

just create another spec file named a different name like kde-gui.spec

then "link" the package to a new package named kde-gui. OBS will
automatically build using the kde-gui.spec. you can "link" a package
by "branch package from other project" command under file section. but
the "other project" should be your same project. the package name
should be "kde-gui"

Later you only need to update your spec files in your shell script
package. they'll be automatically sync-ed.

> BTW, the KDE-based GUI is actually written in Python, and contains
> binary executables, so I guess this should be ‘noarch’ too?
>

no.

Python is a special case. we all have them arch. unless the files are
all under /usr/share.

arch package can requires a noarch package as dependency, so don't worry.

Marguerite
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Architecture question (noarch or i586/x86_64?)

Philipp Thomas-3
In reply to this post by Karl Ove Hufthammer
On Sun, 02 Sep 2012 08:53:24 +0200, Karl Ove Hufthammer
<[hidden email]> wrote:

>Basically, my package *is* architecture-neutral, as the exact same
>package should work on all architectures, without any need for
>recompiling.

I'd say that is noarch. Just try setting it to noarch and use
'osc build' to build it locally. The build will stop if for any reason
the package is deemed to not be noarch and you'll also be told what;s
wrong.

Philipp
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Architecture question (noarch or i586/x86_64?)

Jean Delvare-3
In reply to this post by Marguerite Su
Le dimanche 02 septembre 2012 à 21:09 +0800, Marguerite Su a écrit :

> On Sun, Sep 2, 2012 at 8:02 PM, Karl Ove Hufthammer <[hidden email]> wrote:
> > Thanks. I’ve now changed it to noarch, by changing BuildArch in the
> > specfile and changing the meta configuration for the project. However,
> > now *no* package seems to be built on OBS. Any ideas why, and how to fix
> > this?
> >
>
> do no change meta. we have no "noarch" build host to build noarch packages.
>
> if the build shows success, it must output packages. by the way, the
> package is not under x86_64 or i586 directory but noarch directory.

If in doubt, check for another noarch package which is known to work,
and do the same. For example:

https://build.opensuse.org/package/view_file?file=quilt.spec&package=quilt&project=openSUSE%3AFactory


> > The original package works fine as a command-line application, and I
> > don’t want any unneeded dependencies on KDE. So I guess for the GUI
> > part I should create a *new* package, with a new .spec file, with a
> > ‘Requires’ line depending on the needed KDE packages and the
> > command-line package (it uses the shell script and the data files). Is
> > that correct, or can everything be written in *one* .spec file? And if I
> > create a new package, is it possible for this to somehow use the
> > original source tarball, so I don’t have to upload it twice every time a
> > new version is released?
> >
>
> yes you can.
>
> just create another spec file named a different name like kde-gui.spec
>
> then "link" the package to a new package named kde-gui. OBS will
> automatically build using the kde-gui.spec. you can "link" a package
> by "branch package from other project" command under file section. but
> the "other project" should be your same project. the package name
> should be "kde-gui"
>
> Later you only need to update your spec files in your shell script
> package. they'll be automatically sync-ed.

Alternatively (and IMHO it is more simple) you can simply define a
subpackage in your original .spec file. See for example:

https://build.opensuse.org/package/view_file?file=sensors.spec&package=sensors&project=openSUSE%3AFactory

sensord depends on rrdtool but the rest does not.

--
Jean Delvare
Suse L3

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Architecture question (noarch or i586/x86_64?)

Jan Matejek-2
In reply to this post by Marguerite Su
Dne 2.9.2012 15:09, Marguerite Su napsal(a):
>> BTW, the KDE-based GUI is actually written in Python, and contains
>> binary executables, so I guess this should be ‘noarch’ too?
>>
> no.
>
> Python is a special case. we all have them arch. unless the files are
> all under /usr/share.

false, python packages can be noarch since 11.2 or something.

So you can pretty much build the KDE GUI as a subpackage within a single
spec-file. You might have build-time dependency on KDE stuff (depending on how
the package is built - if it is just some python scripts, maybe you don't need
the deps to build it), but you can specify package requirements separately.

m.

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Architecture question (noarch or i586/x86_64?)

Christian Boltz-5
In reply to this post by Karl Ove Hufthammer
Hello,

Am Sonntag, 2. September 2012 schrieb Karl Ove Hufthammer:

> I also have another packaging question for the application. The main
> application is an architecture-independent command-line shell script,
> but it also has an optinal KDE-based GUI (actually, a plasmoid), not
> currently packaged.
>
> The original package works fine as a command-line application, and I
> don’t want any unneeded dependencies on KDE. So I guess for the GUI
> part I should create a *new* package, with a new .spec file, with a
> ‘Requires’ line depending on the needed KDE packages and the
> command-line package (it uses the shell script and the data files). Is
> that correct, or can everything be written in *one* .spec file? And
> if I create a new package, is it possible for this to somehow use the
> original source tarball, so I don’t have to upload it twice every
> time a new version is released?

If the code for the GUI comes from the same tarball, the usual way is to
build a sub-package from the same spec. You'll need something like

%package gui
Summary: GUI for [...]
Requires: kde4-something
[...]

%description gui
Long description of the gui subpackage

%files gui
[...]

The only restriction is: if the main package is noarch, subpackages
can't be arch-specific AFAIK.

> BTW, the KDE-based GUI is actually written in Python, and contains
> binary executables, so I guess this should be ‘noarch’ too?

With the added "contains NO binary executeables" it probably can be
noarch.


Regards,

Christian Boltz
--
+++ vcdimager.changes
+Thu Apr  7 15:49:40 UTC 2011 - jw[at]novell.com [...]
+- new copyright patch added, to fulfill Joerg's last wish in bnc#672491

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Architecture question (noarch or i586/x86_64?)

Křištof Želechovski-2
Dnia czwartek, 6 września 2012 18:14:00 Christian Boltz pisze:
> > BTW, the KDE-based GUI is actually written in Python, and contains
> > binary executables, so I guess this should be ‘noarch’ too?
>
> With the added "contains NO binary executeables" it probably can be
> noarch.

Compiled Python files are binary and noarch.

Chris


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]