Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing an empty directory with RPM

In my install section of my rpm Spec file I have a bunch of mkdir's to create the directories I need. The ones that don't have any files installed in them get pruned out in the end and don't end up getting created. How can I ensure that the empty directories get created when it is all said and done?

like image 666
Nikordaris Avatar asked Jul 22 '10 12:07

Nikordaris


People also ask

How do you create an empty directory?

Create the new directory by right-clicking (in your system's file tree) on the folder where you want to create the directory, and selecting menu item "New Folder...". When prompted, enter the directory name: Empty.

What is %install in RPM spec file?

spec file following the %build section is the %install section. This script installs the binaries, man pages, configuration files, and all other components that belong in your RPM package to their respective locations in our virtual build root directory.

What is Buildroot in RPM?

This helps package building by normal users. Simply use. Buildroot: <dir> in your spec file. The actual buildroot used by RPM during the build will be available to you (and your prep, build, and install sections) as the environment variable RPM_BUILD_ROOT.


1 Answers

In your %files section:

%files
%dir /my/directory/name
like image 187
m1tk4 Avatar answered Oct 01 '22 03:10

m1tk4