aboutsummaryrefslogtreecommitdiffstats
path: root/libretools/README.md
blob: 85c0569f8af91fd77d5610daab27744da86ad0df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
### Configurar makepkg

#### Definir PACKAGER

```console
$ sed -e 's|#PACKAGER="John Doe <john@doe.com>"|PACKAGER="Libre U. <user@email.domain>"|' -i /etc/makepkg.conf
```

#### Definir GPG-ID PACKAGER

```console
$ sed -e 's|#GPGKEY=""|GPGKEY="user-id"|' -i /etc/makepkg.conf
```

### Generar nuevas sumas

```console
$ updpkgsums
```

### Limpiar librechroot

```console
$ doas librechroot clean-repo
```

### Construir entornos:

```console
$ doas librechroot -A x86_64 -n x86_64 make
```

```console
$ doas librechroot -A i686 -n i686 make
```

#### Avanzado

```console
$ doas librechroot -C /etc/pacman.conf -M /usr/share/pacman/defaults/makepkg.conf.i686 -n i686 make
```

### Entrar a la Jaula

```console
$ doas librechroot -n x86_64 enter
```

```console
$ doas librechroot -n i686 enter
```

### Compilar:

```console
$ doas libremakepkg -n x86_64
```

```console
$ doas libremakepkg -n i686
```

### Actualizar jaula

```console
$ doas librechroot update
```

```console
$ doas librechroot -n i686 update
```

### Habilitanado internet durante la compilación

```console
$ doas libremakepkg -N
```

### Subiendo paquete

```console
$ librestage <grupo>
```

### Escribir parche

```console
$ git diff --no-prefix --no-index --no-renames --binary a b > parche.patch
```


> <grupo> repo en donde poner el paquete ej. core, extra, community

```console
$ librerelease
```

### Example config doas

```console
$ doas nano -w /etc/doas.conf
```

```bash
## doas configuration file.
##
## See the doas man page for the details on how to write a configuration file.
##

## Allow members of group wheel to execute any command
permit persist :wheel

## Same thing without a password
#permit nopass :wheel

## Allow tedu to run procmap as root without a password
#permit nopass tedu as root cmd /usr/sbin/procmap

## Allow members of group power to execute power commands
permit nopass :power cmd openrc-shutdown
permit nopass :power cmd runit-halt
permit nopass :power cmd runit-shutdown
permit nopass :power cmd halt
permit nopass :power cmd poweroff
permit nopass :power cmd reboot
permit nopass :power cmd shutdown

## Allow root user to execute any command
permit nopass root
```

## Configuración chroot para Hyperbola v0.4

Editar `/etc/pacman.d/mirrorlist` del sistema operativo local con las URLs de testing (al menos por ahora hasta fijar libretools).

```console
$ wget https://paste.debian.net/plain/1199102 -O /tmp/pacman.conf
```

```console
$ doas librechroot -C /tmp/pacman.conf make
```

```console
$ wget https://paste.debian.net/plain/1199103 -O /tmp/mirrorlist
```

Cambiar `<your-user>` por su usuario:

```console
$ doas cp -av /tmp/mirrorlist /var/lib/archbuild/default/<your-user>/etc/pacman.d/mirrorlist
```

```console
$ doas chattr +i /var/lib/archbuild/default/<your-user>/etc/pacman.d/mirrorlist
```

Fijar arch-nspawn:

```console
$ doas sed -e 's|echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist"|#echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist"|g' -i /usr/lib/libretools/chroot/arch-nspawn
```

```console
$ doas librechroot update
```

Restaurar el archivo `/etc/pacman.d/mirrorlist` de sistema operativo local