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

Keep track of files installed by packages #3

Open
Boris-Dimov opened this issue Jul 2, 2022 · 9 comments
Open

Keep track of files installed by packages #3

Boris-Dimov opened this issue Jul 2, 2022 · 9 comments
Labels
enhancement New feature or request future-proofing Dis feature ae gonna ease burdens in da futre
Milestone

Comments

@Boris-Dimov
Copy link
Contributor

Bc packages almost always contain more than a single file, would be good to have a place where to keep track of all the files installed by various packages.

For example: we create a dir at /etc/fpkg/; there, we will have configs etc, but also a subdir 'packages'; in this subdir, there will be a directory with the package name, which will hold a file named fileslist or sth, where on each line there will be the full path to the installed files from this package.

I think this will make removal cleaner. Also, the package dir can hold other things like metadata.

@Boris-Dimov Boris-Dimov added enhancement New feature or request future-proofing Dis feature ae gonna ease burdens in da futre labels Jul 2, 2022
@Kaper365
Copy link
Member

Kaper365 commented Jul 2, 2022

Suggested resolution: ship a list of files and dirs that are going to be created with every fpkg file and it would serve as install and delete list

Suggestion: split created files into categories, that way stuff like configs won't be deleted because of accidental removal

@Boris-Dimov
Copy link
Contributor Author

So sth like (on a single line):

FILENAME/DIRNAME IN TAR:PATH ON FILESYSTEM:TYPE

Assuming ':' is the delimeter.

@Kaper365
Copy link
Member

Kaper365 commented Jul 2, 2022

I meant rather this kind of file:

files: {
file 1 (/home/${usr}/file1;
file 2 (/usr/bin/file2);
}

And with this categories I meant:

necessary {
file1
}

config {
file2
}

misc {
file3
}

@Boris-Dimov
Copy link
Contributor Author

Shell scripts work much easier with data on a single line, rather than JSON-style data.

We should settle on a file list format before going any further imo.

I propose the following:

There will be 2 lists of files - one for config files (not gonna be deleted in uninstall unless forced to) and one for regular files
They will reside in the tar, and will be copied to the package's folder in '/etc/fpkg/packages'
I propose that in the .tar they be named however the package maintainer likes, and the filenames will be given in the metadata
But once we copy them over, we'll rename them to sth standard like "configs_list" and "files_list"

Each like of the file will be as follows:

PATH_IN_TARBALL:PATH_ON_FILESYSTEM

Ez pz

@Kaper365
Copy link
Member

Kaper365 commented Jul 5, 2022

I'd propose this layout:

| tar
|-- auto_install_script     //if necessary for e.g. config
|-- individual_files
|---- //stuff that goes e.g into ~/.config
|-- program_files
|---- binaries
|---- misc               // e.g. license

We'd enforce strict packaging practices in terms of naming of dirs and essential files

@Boris-Dimov
Copy link
Contributor Author

How do you imagine that working with real filenames? I just can't comprehend what's a filename and what's a category description

@Kaper365
Copy link
Member

Kaper365 commented Jul 5, 2022

Just like C programs have stuff like MAKEFILE or LICENSE that's just always there, we'd also have some fixed names (My example was rather provisional)

@Boris-Dimov
Copy link
Contributor Author

Aha so these are the fixed names you propose

@Kaper365
Copy link
Member

Kaper365 commented Jul 5, 2022

Not necessarily, we'll discuss the names after we'll set the way of creating of fpkgs

@Kaper365 Kaper365 added this to the ALPHA-1 milestone Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future-proofing Dis feature ae gonna ease burdens in da futre
Projects
None yet
Development

No branches or pull requests

2 participants