| 
									
										
										
										
											2021-02-27 02:50:00 +03:00
										 |  |  | #!/usr/bin/env bash | 
					
						
							|  |  |  | # The builder user is already created in the rootfs | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin | 
					
						
							|  |  |  | export LC_ALL=en_US.UTF-8 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Upgrade | 
					
						
							| 
									
										
										
										
											2021-03-01 15:43:07 +03:00
										 |  |  | pacman -Suy --noconfirm | 
					
						
							| 
									
										
										
										
											2021-02-27 02:50:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-06 06:41:56 +03:00
										 |  |  | # gnupg dir permissions | 
					
						
							|  |  |  | chown -R "$BUILDUSER:$BUILDUSER" /.gnupg | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-06 06:48:58 +03:00
										 |  |  | # Add sudo permissions for pacman to install dependencies | 
					
						
							|  |  |  | printf '%s ALL=(ALL) NOPASSWD: /usr/bin/pacman\n' "$BUILDUSER" > /etc/sudoers.d/builduser | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-27 02:50:00 +03:00
										 |  |  | # Workdir | 
					
						
							|  |  |  | cd /buildroot | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Build the damn thing | 
					
						
							| 
									
										
										
										
											2021-03-06 07:06:47 +03:00
										 |  |  | sudo -u "$BUILDUSER" GNUPGHOME="/.gnupg" makepkg "$@" |