I was setting up my first Rust program and pushing the changes to github. I committed the target directory that was created when I made my rust program with Cargo. Does this file contain sensitive information?
Related
I'd like the build output directory to follow the architecture I'm building on.
Currently when I use "Cargo build" without any target it puts the output in ./target/debug or ./target/release. When I build for other target architectures, it puts them into ./target/[architecture string]/debug (or release).
Seems internally rust is using rustc -vV to determine the architecture and I want to use that.
Is there a way to have it default to the current target architecture folder without hardcoding the path output directory?
The use-case here is we are building apps on multiple platforms by multiple people. And everybody's building into the same directory. We'd like it to output to the same directory as the target architecture as they're building on.
I need help. I've created a new release of my tool in GitLab and the zip files were created successfully. I can now download them via this URL:
https://gitlab.xxx.de/xxx-development/xxx-helper/-/archive/v1.0.0/xxx-helper-v1.0.0.zip
The problem is that I need to remove the -v1.0.0 somehow from the file name of the zip file because otherwise a target system creates a folder with the version in the name which makes huge problems. So at least I need this structure:
https://gitlab.xxx.de/xxx-development/xxx-helper/-/archive/v1.0.0/xxx-helper.zip
How can I do this?
The naming of releases is automated, and changing it would require updates to several parts of the Gitlab stack/codebase.
Answer: it's technically possible but not simple.
One portion that serves as a functional example to illustrate; guest users of private projects are allowed to view the Releases page but are not allowed to view details about the Git repository (in particular, tag names). Because of this, release titles are replaced with a generic title like “Release-1234” for Guest users to avoid leaking tag name information.
This is the URL you are referring to, and asking to change. It uses the generic title.
I can point to some parts of the codebase, but probably not all easily - it would require some significant effort. This is a project. It would also matter if you are using CE or EE.
Cargo has the --target-dir flag which specifies a directory to store temporary or cached build artifacts. You also can set it user-wide in the ~/.cargo/config file. I'd like to set it to single shared directory to make maintenance easier.
I saw some artifact directories are suffixed with some unique(?) hashes in the target-dir which looks safe, but the final products are not suffixed with hashes, which doesn't seem to be safe for name clashes. I'm not sure on this as I am not an expert on Cargo.
I tried setting ~/.cargo/config to
[build]
target-dir = "./.build"
My original intention was to use the project's local ./.build directory, but somehow Cargo places all build files into ~/.build directory. I got curious what would happen I put all build files from every project into a single shared build directory.
It has worked well with several different projects so far, but working for a few samples doesn't mean it's designed or guaranteed to work with every case.
In my case, I am using single shared build directory for all projects of all workspaces of a user. Not only projects in a workspace. Literally every project in every workspace of a user. As far as I know, Cargo is designed to work with a local target directory. If it is designed to work with only local directory, a shared build directory is likely to cause some issues.
Rust/Cargo 1.38.0.
Yes, this is intended to be safe.
I agree with the comments that there are probably better methods of achieving your goal. Workspaces are a simple solution for a small group of crates, and sccache is a more principled caching mechanism.
See also:
Fix running Cargo concurrently (PR #2486)
Allow specifying a custom output directory (PR #1657)
Can I prevent cargo from rebuilding libraries with every new project?
I have faced the error
remote: Hello there! We have restricted the binary files (.exe, .dll, .zip, .7z, .deb, .cab, .gz, .pkg, .iso) that are pushed into GitLab.
while try to push the .dll file into GitLab.
I tried to remove the .dll file type from the git ignore file list but i could not find the document gitignore_global.txt which is directory was represented in,
Gitlab: Tools->Options->Git tab->Edit file.
Kindly let me know If the document was not present then where from the ignore-able list was get and how can i skip .dll files from those list.
Unless you are running your own server (and the admins, if not you, change the push rules), you won't be able to push any of those file types. Those 9 are selected since generally those are very large files and shouldn't be stored in git.
If you run your own Gitlab server though, and absolutely need to store the .dll file in git, you can adjust the push rules in the Admin area. See the docs here: https://docs.gitlab.com/ee/push_rules/push_rules.html#enabling-push-rules
So, I have a puppet repository. It's versioned with git and things like that. It would be convenient for me to be able to make tentative changes to a copy this repository on my machine, then try out the changes on a test computer, before committing these changes to the puppet server (avoiding the hassles of touching production machines for testing, and the hassle of puppetca signing a temporary EC2 instance). I can scp a copy of the repostory over to the appropriate machine and do puppet apply site.pp --modulepath=foo --templatedir=blah, and it mostly works...
until I have a file that's sourced from puppet:///private/foo. Then it's all Could not evaluate: Could not retrieve information from source(s) puppet:///private/foo at /home/ubuntu/ops-puppet/production/modules/foobar/manifests/baz.pp:68.
Is there a command line flag I can use to make to specify the path to the 'private' files? I can't seem to locate it in the documentation (but I might just be oblivious this morning ;)
Check your /etc/puppet/fileserver.conf file (http://docs.puppetlabs.com/guides/file_serving.html#file-server-configuration) and make sure it has a [private] block that points to the expected directory.
Zac B's comments on the question about checking the permissions on the private directory are also a good idea.