Bug 817391 - Review Request: jupiter - Jupiter Hardware Control System for Computers
Review Request: jupiter - Jupiter Hardware Control System for Computers
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nobody's working on this, feel free to take it
Fedora Extras Quality Assurance
Stalled Submitter
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-29 12:41 EDT by Adrian Alves
Modified: 2013-05-31 14:28 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-31 14:28:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Adrian Alves 2012-04-29 12:41:38 EDT
Spec URL: http://alvesadrian.fedorapeople.org/jupiter.spec
SRPM URL: http://alvesadrian.fedorapeople.org/jupiter-0.1.4+svn04112012-1.fc16.src.rpm
Description: Jupiter Control System for Computers. Hardware Control Interface.
Comment 1 Rino Rondan 2012-05-01 01:51:46 EDT
Before remove the package I did rpm -ql jupiter and I saved the output on text file.

[restauracion@/home/crond1/rpmbuild/SPECS $] cat ../test 
/etc/pm/power.d
/etc/pm/power.d/00-jupiter-cpu
/etc/xdg/autostart/jupiter-startup.desktop
/etc/xdg/autostart/jupiter.desktop
/usr/bin/jupiter
/usr/lib/jupiter/kernel
/usr/lib/jupiter/kernel/battery
/usr/lib/jupiter/kernel/power
/usr/lib/jupiter/scripts
/usr/lib/jupiter/scripts/bluetooth
/usr/lib/jupiter/scripts/cpu-control
/usr/lib/jupiter/scripts/jupiter
/usr/lib/jupiter/scripts/notify
/usr/lib/jupiter/scripts/resolutions
/usr/lib/jupiter/scripts/rotate
/usr/lib/jupiter/scripts/state
/usr/lib/jupiter/scripts/touchpad
/usr/lib/jupiter/scripts/vga-out
/usr/lib/jupiter/scripts/wifi
/usr/share/applications/jupiter.desktop
/usr/share/pixmaps/bluetooth.png
/usr/share/pixmaps/bolt1.png
/usr/share/pixmaps/bolt2.png
/usr/share/pixmaps/bolt3.png
/usr/share/pixmaps/bolt4.png
/usr/share/pixmaps/camera-web.png
/usr/share/pixmaps/devices.png
/usr/share/pixmaps/display.png
/usr/share/pixmaps/gnome-dev-wavelan.png
/usr/share/pixmaps/input-tablet.png
/usr/share/pixmaps/jupiter.png
/usr/share/pixmaps/ondemand.png
/usr/share/pixmaps/overclock.png
/usr/share/pixmaps/performance.png
/usr/share/pixmaps/powersave.png
/usr/share/pixmaps/resolution.png
/usr/share/pixmaps/rotate.png
/var/jupiter

[02:51:27]

Then I remove the package yum remove jupiter.
And when I check what happen with the files created some files were not removed by yum or rpm -e .
[restauracion@/home/crond1/rpmbuild $] cat test | xargs  ls -l 
ls: cannot access /etc/pm/power.d/00-jupiter-cpu: No such file or directory
ls: cannot access /etc/xdg/autostart/jupiter-startup.desktop: No such file or directory
ls: cannot access /etc/xdg/autostart/jupiter.desktop: No such file or directory
ls: cannot access /usr/bin/jupiter: No such file or directory
ls: cannot access /usr/lib/jupiter/kernel: No such file or directory
ls: cannot access /usr/lib/jupiter/kernel/battery: No such file or directory
ls: cannot access /usr/lib/jupiter/kernel/power: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/bluetooth: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/cpu-control: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/jupiter: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/notify: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/resolutions: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/rotate: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/state: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/touchpad: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/vga-out: No such file or directory
ls: cannot access /usr/lib/jupiter/scripts/wifi: No such file or directory
ls: cannot access /usr/share/applications/jupiter.desktop: No such file or directory
ls: cannot access /usr/share/pixmaps/bluetooth.png: No such file or directory
ls: cannot access /usr/share/pixmaps/bolt1.png: No such file or directory
ls: cannot access /usr/share/pixmaps/bolt2.png: No such file or directory
ls: cannot access /usr/share/pixmaps/bolt3.png: No such file or directory
ls: cannot access /usr/share/pixmaps/bolt4.png: No such file or directory
ls: cannot access /usr/share/pixmaps/camera-web.png: No such file or directory
ls: cannot access /usr/share/pixmaps/devices.png: No such file or directory
ls: cannot access /usr/share/pixmaps/display.png: No such file or directory
ls: cannot access /usr/share/pixmaps/gnome-dev-wavelan.png: No such file or directory
ls: cannot access /usr/share/pixmaps/input-tablet.png: No such file or directory
ls: cannot access /usr/share/pixmaps/jupiter.png: No such file or directory
ls: cannot access /usr/share/pixmaps/ondemand.png: No such file or directory
ls: cannot access /usr/share/pixmaps/overclock.png: No such file or directory
ls: cannot access /usr/share/pixmaps/performance.png: No such file or directory
ls: cannot access /usr/share/pixmaps/powersave.png: No such file or directory
ls: cannot access /usr/share/pixmaps/resolution.png: No such file or directory
ls: cannot access /usr/share/pixmaps/rotate.png: No such file or directory
/etc/pm/power.d:
total 0

/var/jupiter:
total 20
-rwxrwxr-x 1 root jupiter 43 Apr 29 04:14 available_resolutions
-rw-r--r-- 1 root root     6 Apr 29 04:14 cpu_mode
-rw-r--r-- 1 root root     6 Apr 29 04:14 power
-rw-r--r-- 1 root root     9 Apr 29 04:14 rotation_saved
-rw-r--r-- 1 root root     6 Apr 29 04:14 vga_saved
[04:33:50]
Comment 2 Jan Vcelak 2012-05-03 02:40:35 EDT
There is a lot of rpmlint errors, please fix them if possible. Otherwise provide some clarification, why the errors cannot be fixed.

$ rpmlint ./jupiter.spec 
./jupiter.spec:6: W: non-standard-group X11/Applications
./jupiter.spec:28: W: macro-in-comment %{_desktopdir}
./jupiter.spec:31: E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/jupiter/scripts/
./jupiter.spec:32: E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/jupiter/kernel/
./jupiter.spec:51: E: hardcoded-library-path in /usr/lib/jupiter/scripts/wifi"
./jupiter.spec:56: E: hardcoded-library-path in /usr/lib/jupiter/scripts/wifi"
./jupiter.spec:62: E: hardcoded-library-path in /usr/lib/jupiter
./jupiter.spec:63: E: hardcoded-library-path in /usr/lib/jupiter
./jupiter.spec:74: E: hardcoded-library-path in /usr/lib/jupiter/scripts/jupiter
./jupiter.spec:80: E: hardcoded-library-path in /usr/lib/jupiter/scripts
./jupiter.spec:81: E: hardcoded-library-path in /usr/lib/jupiter/scripts
./jupiter.spec:82: E: hardcoded-library-path in /usr/lib/jupiter/kernel
./jupiter.spec:83: E: hardcoded-library-path in /usr/lib/jupiter/kernel
./jupiter.spec: W: no-%build-section
./jupiter.spec:60: W: mixed-use-of-spaces-and-tabs (spaces: line 60, tab: line 1)
./jupiter.spec: W: invalid-url Source0: jupiter-0.1.4+svn04112012.tar.gz
0 packages and 1 specfiles checked; 11 errors, 5 warnings.
Comment 3 Matthias Runge 2012-05-03 03:11:51 EDT
Hmm, it looks like you simply took the spec from here
http://jupiter.svn.sourceforge.net/viewvc/jupiter/packages/fuduntu/jupiter.spec?revision=225

and substituted any reference to original author to you. Ah, no, you also dropped the BuildRoot-definition and the empty preun: section.

- your install-section is some verbose. It may be nice in fuduntu, RPM installs in fedora shall be silent. 

- You're changing sudoers file. If you're using that, you need to require it.

- I guess, there's a more elegant way to get users added to sudoers. Esp. you're hard coding user ids (everything above 500)

- you're simply adding a user and a group. please consult https://fedoraproject.org/wiki/Packaging:UsersAndGroups

- There's no need to require coreutils, see https://fedoraproject.org/wiki/Packaging:Guidelines#Requires

- you are the submitter. You can not review your own package. (you shouldn't set the fedora-review-flag)
Comment 4 Terje Røsten 2012-05-03 03:52:29 EDT
Please read:

 https://fedoraproject.org/wiki/Packaging:Guidelines

and most linked documents before you continue, there are several issues 
in "your"[1] spec file.

Are you sponsored?

 https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group

[1]: why have you removed the changelog from the original rpm spec?
Comment 6 Jan Vcelak 2012-05-13 17:11:29 EDT
> http://alvesadrian.fedorapeople.org/jupiter.spec

The RPM must not write anything on the stdout/stderr during instalation, upgrade, etc.

And there are also recommended snippets for adding new users:
http://fedoraproject.org/wiki/Packaging/UsersAndGroups
Comment 8 Adrian Alves 2012-05-13 19:09:37 EDT
Added a new release with the fixes of the output and the group that u guys suggest me.

http://alvesadrian.fedorapeople.org/jupiter.spec
http://alvesadrian.fedorapeople.org/jupiter-0.1.2-3.fc16.src.rpm
Comment 9 Sergio Monteiro Basto 2012-05-13 21:36:37 EDT
mock -r fedora-16-x86_64  --rebuild jupiter-0.1.2-3.fc16.src.rpm (*)

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.UMYb6q
+ umask 022
+ cd /builddir/build/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ getent group jupiter
+ groupadd -r jupiter
/var/tmp/rpm-tmp.UMYb6q: line 32: /usr/sbin/groupadd: Permission denied

groupadd -r jupiter , just should be in %post 


(*) http://www.serjux.com/alps/how_to_use_mock.txt
Comment 10 Adrian Alves 2012-05-13 21:47:56 EDT
(In reply to comment #9)
> mock -r fedora-16-x86_64  --rebuild jupiter-0.1.2-3.fc16.src.rpm (*)
> 
> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.UMYb6q
> + umask 022
> + cd /builddir/build/BUILD
> + LANG=C
> + export LANG
> + unset DISPLAY
> + getent group jupiter
> + groupadd -r jupiter
> /var/tmp/rpm-tmp.UMYb6q: line 32: /usr/sbin/groupadd: Permission denied
> 
> groupadd -r jupiter , just should be in %post 
Fixed

http://alvesadrian.fedorapeople.org/jupiter.spec
http://alvesadrian.fedorapeople.org/jupiter-0.1.2-4.fc16.src.rpm
Comment 11 Sergio Monteiro Basto 2012-05-13 22:27:33 EDT
(In reply to comment #10)

> http://alvesadrian.fedorapeople.org/jupiter-0.1.2-4.fc16.src.rpm

I download this one and got the same error  
please update jupiter-0.1.2-4.fc16.src.rpm with new spec 

I must delete 2 lines in %prep 


other error with mock build: 

/var/tmp/rpm-tmp.le5zv0: line 46: desktop-file-validate: command not found
Comment 12 Adrian Alves 2012-05-13 22:39:00 EDT
(In reply to comment #11)
> (In reply to comment #10)
> 
> > http://alvesadrian.fedorapeople.org/jupiter-0.1.2-4.fc16.src.rpm
> 
> I download this one and got the same error  
> please update jupiter-0.1.2-4.fc16.src.rpm with new spec 
> 
> I must delete 2 lines in %prep 
> 
> 
> other error with mock build: 
> 
> /var/tmp/rpm-tmp.le5zv0: line 46: desktop-file-validate: command not found


Sorry my bad, fixed I pushed the right version now:

http://alvesadrian.fedorapeople.org/jupiter.spec
http://alvesadrian.fedorapeople.org/jupiter-0.1.2-4.fc16.src.rpm
Comment 13 Ralf Corsepius 2012-05-14 02:51:06 EDT
Packages are not allowed to install directories directly under /var.

Please choose a different directory, such as /var/lib/jupiter or /var/cache/jupiter instead (Which directory is appropriate, depends upon contents).
Comment 14 Sergio Monteiro Basto 2012-05-14 15:33:20 EDT
(In reply to comment #12)
> > 
> > other error with mock build: 
> > 
> > /var/tmp/rpm-tmp.le5zv0: line 46: desktop-file-validate: command not found



http://fedoraproject.org/wiki/Packaging/Guidelines#desktop-file-install_usage
(...) and have BuildRequires: desktop-file-utils
Comment 15 Adrian Alves 2012-05-14 18:49:03 EDT
Fixed the /var issue and desktop-file-utils:
http://alvesadrian.fedorapeople.org/jupiter.spec
http://alvesadrian.fedorapeople.org/jupiter-0.1.2-5.fc16.src.rpm
Comment 16 Matthias Runge 2012-05-15 03:01:00 EDT
Your Source0 is not a valid URL, see
 
https://fedoraproject.org/wiki/Packaging:SourceURL

You should drop your commented echos.
Comment 17 Terje Røsten 2012-05-15 03:28:12 EDT
This sudo hacking seems messy, consider to use pkexec from polkit. 
A quick intro is found here:

 https://fedoraproject.org/wiki/Features/UsermodeMigration
Comment 18 Adrian Alves 2012-05-15 19:39:55 EDT
(In reply to comment #16)
> Your Source0 is not a valid URL, see
> 
> https://fedoraproject.org/wiki/Packaging:SourceURL
> 
> You should drop your commented echos.
Check it please, I have to add a comments there:
http://alvesadrian.fedorapeople.org/jupiter.spec
http://alvesadrian.fedorapeople.org/jupiter-0.1.2-6.fc16.src.rpm
Comment 19 Adrian Alves 2012-05-15 19:41:37 EDT
(In reply to comment #17)
> This sudo hacking seems messy, consider to use pkexec from polkit. 
> A quick intro is found here:
> 
>  https://fedoraproject.org/wiki/Features/UsermodeMigration

How u recommend to use it?
make an script how?
How do I use this:
exec /usr/bin/pkexec  command?
that way? can u help me? how i need to remove the sudo hack for this pkexec? not sure how.
Comment 20 Sergio Monteiro Basto 2012-05-16 14:03:23 EDT
Spec URL: http://alvesadrian.fedorapeople.org/jupiter.spec
SRPM URL: http://alvesadrian.fedorapeople.org/jupiter-0.1.2-6.fc16.src.rpm

use this form please so I can do: fedora-review -b 817391 --mock-config fedora-16-x86_64
Comment 21 Adrian Alves 2012-05-16 14:11:10 EDT
(In reply to comment #20)
> Spec URL: http://alvesadrian.fedorapeople.org/jupiter.spec
> SRPM URL: http://alvesadrian.fedorapeople.org/jupiter-0.1.2-6.fc16.src.rpm
> 
> use this form please so I can do: fedora-review -b 817391 --mock-config
> fedora-16-x86_64
What u mean ? just run in the command line this:
fedora-review -b 817391 --mock-config fedora-16-x86_64
Comment 22 Sergio Monteiro Basto 2012-05-16 14:17:34 EDT
(In reply to comment #21)
> (In reply to comment #20)
> > Spec URL: http://alvesadrian.fedorapeople.org/jupiter.spec
> > SRPM URL: http://alvesadrian.fedorapeople.org/jupiter-0.1.2-6.fc16.src.rpm
> > 
> > use this form please so I can do: fedora-review -b 817391 --mock-config
> > fedora-16-x86_64
> What u mean ? just run in the command line this:
> fedora-review -b 817391 --mock-config fedora-16-x86_64

yes, but to work you should specify  Spec URL and  SRPM URL.

other thing jupiter.spec don't have %build ?
Comment 23 Terje Røsten 2012-05-16 15:32:19 EDT
> How you recommend to use it? make an script how?
> How do I use this:
> exec /usr/bin/pkexec  command?
> that way? 

Yeah, that's a good start. 

In fedora we usual don't bring in sudo to let unprivileged processes/users run an application as privileged user, the recommended interface these days is polkit:

 http://www.freedesktop.org/wiki/Software/polkit

one of ways polkit can be used is by pkexec. 

How to use pkexec is explained in the quick intro:

 https://fedoraproject.org/wiki/Features/UsermodeMigration

I used this page to convert lshw to use pkexec. 

You can clone this package for more hints.

fedpkg clone lshw

I would also recommended to see example spec available at 

 http://pkgs.fedoraproject.org/gitweb/

to get a feeling how spec should look like. This approach is better
than copying spec from third party which don't have a clue about Fedora Guidelines.
Comment 24 Adrian Alves 2012-05-16 18:56:09 EDT
(In reply to comment #22)
> (In reply to comment #21)
> > (In reply to comment #20)
> > > Spec URL: http://alvesadrian.fedorapeople.org/jupiter.spec
> > > SRPM URL: http://alvesadrian.fedorapeople.org/jupiter-0.1.2-6.fc16.src.rpm
> > > 
> > > use this form please so I can do: fedora-review -b 817391 --mock-config
> > > fedora-16-x86_64
> > What u mean ? just run in the command line this:
> > fedora-review -b 817391 --mock-config fedora-16-x86_64
> 
> yes, but to work you should specify  Spec URL and  SRPM URL.
> 
> other thing jupiter.spec don't have %build ?

I added the builg tag but i dont follow how to run that command can you clarify me that?

Regards, Adrian.-
Comment 25 Adrian Alves 2012-05-16 18:57:39 EDT
(In reply to comment #23)
> > How you recommend to use it? make an script how?
> > How do I use this:
> > exec /usr/bin/pkexec  command?
> > that way? 
> 
> Yeah, that's a good start. 
> 
> In fedora we usual don't bring in sudo to let unprivileged processes/users run
> an application as privileged user, the recommended interface these days is
> polkit:
> 
>  http://www.freedesktop.org/wiki/Software/polkit
> 
> one of ways polkit can be used is by pkexec. 
> 
> How to use pkexec is explained in the quick intro:
> 
>  https://fedoraproject.org/wiki/Features/UsermodeMigration
> 
> I used this page to convert lshw to use pkexec. 
> 
> You can clone this package for more hints.
> 
> fedpkg clone lshw
> 
> I would also recommended to see example spec available at 
> 
>  http://pkgs.fedoraproject.org/gitweb/
> 
> to get a feeling how spec should look like. This approach is better
> than copying spec from third party which don't have a clue about Fedora
> Guidelines.

Can you check my spec al help me how to implement that? because i dont follow how te replace all my %post with that I will appreciate that please if u can assist me with pkexec never used before.

Regards, Adrian.-
Comment 26 Sergio Monteiro Basto 2012-05-16 19:08:50 EDT
other thing that I just found now is /etc/sudoers.d/999-jupiter 
is not in file list . 
shouldn't add 999-jupiter at post, should be in install for when remove package also remove  /etc/sudoers.d/999-jupiter  .

about %build 

normally in build we have:  

./configure
make
Comment 27 Adrian Alves 2012-05-16 20:13:37 EDT
(In reply to comment #26)
> other thing that I just found now is /etc/sudoers.d/999-jupiter 
> is not in file list . 
> shouldn't add 999-jupiter at post, should be in install for when remove package
> also remove  /etc/sudoers.d/999-jupiter  .
> 
> about %build 
> 
> normally in build we have:  
> 
> ./configure
> make

Sergio I dont have anything to build thats why I removed %build tag thats why i didnt use it but I added because u ask but i think %build is not necessary in this case
probably if I remove the %post tag and make everything that post does in the %install section?
Comment 28 Adrian Alves 2012-05-16 21:07:48 EDT
how can I replace all this? what u guys did u recommend?
for i in $(awk -F: '$6 ~ /\/home/ && $3 >= 500 {print $1}' /etc/passwd);
 do
   echo -n $i" "
   usermod -G jupiter -a $i 2>/dev/null || true
 done
if [ -d "/etc/sudoers.d" ]; then
  if [ ! -e "/etc/sudoers.d/999-jupiter" ]; then
    sed -i "/%jupiter.*\$/d" /etc/sudoers
    echo "%jupiter ALL=NOPASSWD: /usr/lib/jupiter/scripts/bluetooth, /usr/lib/jupiter/scripts/cpu-control, /usr/lib/jupiter/scripts/resolutions, /usr/lib/jupiter/scripts/rotate, /usr/lib/jupiter/scripts/touchpad, /usr/lib/jupiter/scripts/vga-out, /usr/lib/jupiter/scripts/wifi" >> /etc/sudoers.d/999-jupiter
  fi
  chmod 0440 /etc/sudoers.d/999-jupiter
  chown root:root /etc/sudoers.d/999-jupiter
else
  grep jupiter /etc/sudoers >/dev/null 2>&1 || echo "%jupiter ALL=NOPASSWD: /usr/lib/jupiter/scripts/bluetooth, /usr/lib/jupiter/scripts/cpu-control, /usr/lib/jupiter/scripts/resolutions, /usr/lib/jupiter/scripts/rotate, /usr/lib/jupiter/scripts/touchpad, /usr/lib/jupiter/scripts/vga-out, /usr/lib/jupiter/scripts/wifi" >> /etc/sudoers
fi
sed -i "s/^Defaults[ \t]*requiretty/#Defaults    requiretty/g" /etc/sudoers
chown -R root:root /usr/lib/jupiter
chmod -R 755 /usr/lib/jupiter
chmod 755 /usr/bin/jupiter
chmod -R 755 /etc/pm/power.d/*jupiter*
if [ ! -d "/var/lib/jupiter" ]; then
  mkdir /var/lib/jupiter
fi
if [ -d "/var/lib/jupiter" ]; then
  chown -R root:jupiter /var/lib/jupiter
  chmod -R 775 /var/lib/jupiter
fi
if [ -e "/usr/lib/jupiter/scripts/jupiter" ]; then
  /usr/lib/jupiter/scripts/jupiter 2>/dev/null || true
fi
Comment 29 Adrian Alves 2012-05-16 21:12:11 EDT
another question is there is better way to make this?
groupadd -r jupiter
Comment 30 Sergio Monteiro Basto 2012-05-16 22:50:21 EDT
(In reply to comment #27)
> (In reply to comment #26)
> > other thing that I just found now is /etc/sudoers.d/999-jupiter 
> > is not in file list . 
> > shouldn't add 999-jupiter at post, should be in install for when remove package
> > also remove  /etc/sudoers.d/999-jupiter  .
> > 
> > about %build 
> > 
> > normally in build we have:  
> > 
> > ./configure
> > make
> 
> Sergio I dont have anything to build thats why I removed %build tag thats why i
> didnt use it but I added because u ask but i think %build is not necessary in
> this case

Put a empty %build tag should be better, more readable and no errors in fedora-review , 

> probably if I remove the %post tag and make everything that post does in the
> %install section?

yeah you should move many things to install , I see that now. 

%post does nothing when it make the package and just do things (as root) when we install package. 

so add user must be on %post, 
 
chmod and mkdir should be in %install and %file , don't need to verify is existence. 

sed -i "s/^Defaults[ \t]*requiretty/#Defaults    requiretty/g" /etc/sudoers
why you need change sudoers ? 

for i in $(awk -F: '$6 ~ /\/home/ && $3 >= 500 {print $1}' /etc/passwd);
 do
   echo -n $i" "
   usermod -G jupiter -a $i 2>/dev/null || true
 done

in %postun (post uninstall) you must revert all of this, remove user etc. 
that the great of rpm. 

Note: I just land here, and I'm try to help you , but not in my power sponsor you. I just like the jupiter thing and try to try it.
Comment 31 Ralf Corsepius 2012-05-17 00:29:19 EDT
(In reply to comment #30)
> (In reply to comment #27)
> > (In reply to comment #26)
> > > other thing that I just found now is /etc/sudoers.d/999-jupiter 
> > > is not in file list . 
> > > shouldn't add 999-jupiter at post, should be in install for when remove package
> > > also remove  /etc/sudoers.d/999-jupiter  .
> > > 
> > > about %build 
> > > 
> > > normally in build we have:  
> > > 
> > > ./configure
> > > make
> > 
> > Sergio I dont have anything to build thats why I removed %build tag thats why i
> > didnt use it but I added because u ask but i think %build is not necessary in
> > this case
> 
> Put a empty %build tag should be better, more readable and no errors in
> fedora-review , 
There was a time rpm mandatorily required a *.spec to carry %prep, %build and %install sections to work properly. 

I don't know if this still applies, but would suggest to add an empty %build section.

> sed -i "s/^Defaults[ \t]*requiretty/#Defaults    requiretty/g" /etc/sudoers
> why you need change sudoers ? 
I don't understand why this step is required and what it is supposed to do.

> for i in $(awk -F: '$6 ~ /\/home/ && $3 >= 500 {print $1}' /etc/passwd);
>  do
>    echo -n $i" "
>    usermod -G jupiter -a $i 2>/dev/null || true
>  done
If I understand correctly, you are trying to add all users with uid >= 500 in /etc/passwd to the jupiter group.

Apart from the fact that "plain searching /etc/passwd" for uid lacks generality to make this work reliable (/etc/passwd is not the only way to host accounts), and that using a hard-coded uid of 500 doesn't make much sense (I guess you are presuming "ordinary users have a uid of >= 500" - This assumption is invalid), I don't understand the sense of this.

IMO, adding existing non-reserved uids to groups should remain an admin's task and require manual interaction, in general.
Comment 32 Adrian Alves 2012-05-17 18:44:13 EDT
(In reply to comment #31)
> (In reply to comment #30)
> > (In reply to comment #27)
> > > (In reply to comment #26)
> > > > other thing that I just found now is /etc/sudoers.d/999-jupiter 
> > > > is not in file list . 
> > > > shouldn't add 999-jupiter at post, should be in install for when remove package
> > > > also remove  /etc/sudoers.d/999-jupiter  .
> > > > 
> > > > about %build 
> > > > 
> > > > normally in build we have:  
> > > > 
> > > > ./configure
> > > > make
> > > 
> > > Sergio I dont have anything to build thats why I removed %build tag thats why i
> > > didnt use it but I added because u ask but i think %build is not necessary in
> > > this case
> > 
> > Put a empty %build tag should be better, more readable and no errors in
> > fedora-review , 
> There was a time rpm mandatorily required a *.spec to carry %prep, %build and
> %install sections to work properly. 
> 
> I don't know if this still applies, but would suggest to add an empty %build
> section.
> 
> > sed -i "s/^Defaults[ \t]*requiretty/#Defaults    requiretty/g" /etc/sudoers
> > why you need change sudoers ? 
> I don't understand why this step is required and what it is supposed to do.
> 
> > for i in $(awk -F: '$6 ~ /\/home/ && $3 >= 500 {print $1}' /etc/passwd);
> >  do
> >    echo -n $i" "
> >    usermod -G jupiter -a $i 2>/dev/null || true
> >  done
> If I understand correctly, you are trying to add all users with uid >= 500 in
> /etc/passwd to the jupiter group.
> 
> Apart from the fact that "plain searching /etc/passwd" for uid lacks generality
> to make this work reliable (/etc/passwd is not the only way to host accounts),
> and that using a hard-coded uid of 500 doesn't make much sense (I guess you are
> presuming "ordinary users have a uid of >= 500" - This assumption is invalid),
> I don't understand the sense of this.
> 
> IMO, adding existing non-reserved uids to groups should remain an admin's task
> and require manual interaction, in general.
I added all your suggestions:
Spec URL: http://alvesadrian.fedorapeople.org/jupiter.spec
SRPM URL: http://alvesadrian.fedorapeople.org/jupiter-0.1.2-7.fc16.src.rpm
Comment 33 Michael Schwendt 2012-12-14 08:55:23 EST
https://fedoraproject.org/wiki/Package_Review_Process
| 
| Wait for someone to review your package! At this point in the process,
| the fedora-review flag is blank, meaning that no reviewer is assigned.

An incorrectly/mistakably set fedora-review flag causes the ticket to be listed
as being worked on by somebody.
Comment 34 Björn "besser82" Esser 2013-05-21 17:47:01 EDT
A "quick" `fedora-review` revealed:

warning: bogus date in %changelog: Mon Nov 18 2010 Andrew Wyatt <andrew.wyatt@fewt.com> 0.0.45

INFO: No upstream for (Source0): jupiter_0.1.2.tar.gz


Rpmlint
-------
Checking: jupiter-0.1.2-7.fc20.noarch.rpm
jupiter.noarch: W: name-repeated-in-summary C Jupiter
jupiter.noarch: W: non-standard-group X11/Applications
jupiter.noarch: W: invalid-license GPL
jupiter.noarch: W: only-non-binary-in-usr-lib
jupiter.noarch: W: no-documentation
jupiter.noarch: W: non-standard-gid /var/jupiter jupiter
jupiter.noarch: E: non-standard-dir-perm /var/jupiter 0775L
jupiter.noarch: W: non-conffile-in-etc /etc/xdg/autostart/jupiter.desktop
jupiter.noarch: W: non-conffile-in-etc /etc/xdg/autostart/jupiter-startup.desktop
jupiter.noarch: E: script-without-shebang /usr/lib/jupiter/scripts/notify
jupiter.noarch: W: no-manual-page-for-binary jupiter
jupiter.noarch: W: percent-in-%post
jupiter.noarch: W: dangerous-command-in-%post chmod
1 packages and 0 specfiles checked; 2 errors, 11 warnings.


Rpmlint (installed packages)
----------------------------
# rpmlint jupiter
jupiter.noarch: W: name-repeated-in-summary C Jupiter
jupiter.noarch: W: non-standard-group X11/Applications
jupiter.noarch: W: invalid-license GPL
jupiter.noarch: W: only-non-binary-in-usr-lib
jupiter.noarch: W: no-documentation
jupiter.noarch: W: non-standard-gid /var/jupiter jupiter
jupiter.noarch: E: non-standard-dir-perm /var/jupiter 0775L
jupiter.noarch: W: non-conffile-in-etc /etc/xdg/autostart/jupiter.desktop
jupiter.noarch: W: non-conffile-in-etc /etc/xdg/autostart/jupiter-startup.desktop
jupiter.noarch: E: script-without-shebang /usr/lib/jupiter/scripts/notify
jupiter.noarch: W: no-manual-page-for-binary jupiter
jupiter.noarch: W: percent-in-%post
jupiter.noarch: W: dangerous-command-in-%post chmod
jupiter.noarch: W: desktopfile-without-binary /usr/share/applications/jupiter.desktop /usr/bin/jupiter
1 packages and 0 specfiles checked; 2 errors, 12 warnings.
# echo 'rpmlint-done:'


Are you still interested in getting this reviewed?
Comment 35 Björn "besser82" Esser 2013-05-30 06:05:41 EDT
If there won't be any response from the submitter until June 9th, I'll change status to CLOSED -> NOTABUG
Comment 36 Andrew Wyatt 2013-05-31 14:17:24 EDT
Jupiter is no longer being maintained and is incompatible with the latest upower and recent kernels, so it's probably best to close this bug out.
Comment 37 Matthias Runge 2013-05-31 14:28:53 EDT
Thank you Andrew!

Adrian, if you still want to continue this, please re-open the bug.

Note You need to log in before you can comment on or make changes to this bug.