Skip to content

Commit 5fd0a0d

Browse files
committed
Fix rpm building.
1 parent 7524316 commit 5fd0a0d

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ assets = [
132132
{ source = "target/man/fr/chsr.8.gz", dest = "/usr/share/man/fr/man8/chsr.8.gz", user = "root", group = "root", mode = "0644", doc = true }
133133
]
134134
post_install_script = "resources/rh/postinst.sh"
135-
post_install_script_prog = [ "/bin/sh", "-c" ]
135+
post_install_script_flags = 0b101
136136

137137
pre_uninstall_script = "resources/rh/prerm.sh"
138-
pre_uninstall_script_prog = [ "/bin/sh", "-c" ]
138+
pre_uninstall_script_flags = 0b101
139139

140140
[package.metadata.generate-rpm.requires]
141141
pam = "*"

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,28 @@
4444
```sh
4545
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
4646
```
47+
(Do not forget to add the cargo bin directory to your PATH with `. "$HOME/.cargo/env"` command)
4748
* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
4849
* You can install git by running the following commands depending on your distribution:
4950
Ubuntu : `sudo apt-get install git`, RedHat : `sudo yum install git`, ArchLinux : `sudo pacman -S git`
50-
* [clang](https://clang.llvm.org/get_started.html)
51+
* [clang](https://clang.llvm.org/get_started.html) (or gcc, but clang is highly recommended)
5152
* You can install clang by running the following commands depending on your distribution:
5253
Ubuntu : `sudo apt-get install clang`, RedHat : `sudo yum install clang`, ArchLinux : `sudo pacman -S clang`
5354

55+
Then the xtask installation will install the rest of the dependencies for you.
5456

55-
### How to install sr and chsr by building from source
57+
### Install from source
5658

57-
1. `git clone <https://github.com/LeChatP/RootAsRole>`
59+
1. `git clone https://github.com/LeChatP/RootAsRole`
5860
1. `cd RootAsRole`
5961
1. `cargo xtask install -bip sudo`
6062

61-
Or you can use deb or rpm packages and install them with apt or rpm commands.
63+
64+
### Install from precompiled binaries
65+
66+
You can download the precompiled binaries from the [release page](https://github.com/LeChatP/RootAsRole/releases).
67+
68+
Then you can install the package with the following commands:
6269

6370
```sh
6471
sudo apt install rootasrole_3.0.0_amd64.deb
@@ -176,16 +183,14 @@ This doesn't mean that earlier versions of these distributions are incompatible;
176183
177184
## Contributors
178185
179-
Ahmad Samer Wazan : <[email protected]>
186+
Eddie Billoir : <[email protected]>
187+
188+
Ahmad Samer Wazan : <[email protected]>
180189
181190
Rémi Venant: <[email protected]>
182191
183192
Guillaume Daumas : <[email protected]>
184193
185-
Eddie Billoir : <[email protected]>
186-
187-
Anderson Hemlee : <[email protected]>
188-
189194
Romain Laborde : <[email protected]>
190195
191196
## About Logo

resources/rh/postinst.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
if [[ -z ${SUDO_USER+x} ]]; then INSTALL_USER=`id -urn`; else INSTALL_USER=$SUDO_USER; fi
1+
#!/bin/sh
2+
if [ -z ${SUDO_USER+x} ]; then INSTALL_USER=$(id -urn); else INSTALL_USER=$SUDO_USER; fi
23

34
filesystem() {
45
df -T "$1" | awk 'NR==2 {print $2}'

resources/rh/prerm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
chattr -i /etc/security/rootasrole.json || true
1+
chattr -i /etc/security/rootasrole.json 2>/dev/null || true

0 commit comments

Comments
 (0)