Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post install script for rpms #1057

Merged
merged 1 commit into from
Jun 14, 2021
Merged

post install script for rpms #1057

merged 1 commit into from
Jun 14, 2021

Conversation

alexcb
Copy link
Collaborator

@alexcb alexcb commented Jun 14, 2021

Post install script to enable bash completion and earthly bootstrapping.

Signed-off-by: Alex Couture-Beil alex@earthly.dev

Post install script to enable bash completion and earthly bootstrapping.

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
@alexcb
Copy link
Collaborator Author

alexcb commented Jun 14, 2021

here's some testing under fedora

Initially it didn't work; however once I did dnf install bash-completion, it started working with zero config:

[root@55c4eab46a78 ~]# earthly --
--allow-privileged         --buildkit-host            --git-password             --max-remote-cache         --push                     --ssh-auth-sock            
--artifact                 --buildkit-image           --git-url-instead-of       --no-cache                 --remote-cache             --strict                   
--auth-token               --ci                       --git-username             --no-output                --save-inline-cache        --use-inline-cache         
--build-arg                --config                   --image                    --platform                 --secret                   --verbose                  
--buildkit-cache-size-mb   --conversion-parallelism   --interactive              --pull                     --secret-file         

Then here's a test of the uninstall

[root@55c4eab46a78 ~]# ls /usr/share/bash-completion/completions/earthly 
/usr/share/bash-completion/completions/earthly   <---- file exists
[root@55c4eab46a78 ~]# dnf remove earthly
Dependencies resolved.
=======================================================================================================================================================================================================================
 Package                                           Architecture                                     Version                                              Repository                                               Size
=======================================================================================================================================================================================================================
Removing:
 earthly                                           x86_64                                           0.5.15-1                                             @@commandline                                            24 M

Transaction Summary
=======================================================================================================================================================================================================================
Remove  1 Package

Freed space: 24 M
Is this ok [y/N]: u
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                               1/1 
  Erasing          : earthly-0.5.15-1.x86_64                                                                                                                                                                       1/1 
  Running scriptlet: earthly-0.5.15-1.x86_64                                                                                                                                                                       1/1 
docker was not found; unable to remove earthly-related docker resources

  Verifying        : earthly-0.5.15-1.x86_64                                                                                                                                                                       1/1 

Removed:
  earthly-0.5.15-1.x86_64                                                                                                                                                                                              

Complete!
[root@55c4eab46a78 ~]# ls /usr/share/bash-completion/completions/earthly 
ls: cannot access '/usr/share/bash-completion/completions/earthly': No such file or directory   <--- after uninstall file no longer exists

@alexcb alexcb requested review from dchw and vladaionescu June 14, 2021 18:47
@alexcb alexcb merged commit c048522 into main Jun 14, 2021
@alexcb alexcb deleted the rpm-post-install branch June 14, 2021 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants